Skip to content

Commit

Permalink
Update main with changes in dev (#2885)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne authored Sep 18, 2023
2 parents 2c1036e + c67e3cf commit b74b2cc
Show file tree
Hide file tree
Showing 220 changed files with 5,843 additions and 2,372 deletions.
6 changes: 2 additions & 4 deletions .circleci/scripts/config-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,13 @@ jobs: # Each project will have individual jobs for each specific task it has to

build-archicad-add-on: # build Archicad C++ add-on
parameters:
e:
type: string
default: win/default
archicadversion:
type: string
default: ""
executor:
name: << parameters.e >>
name: win/server-2019
shell: bash.exe
version: 2023.04.1 # Version 2023.08.01 broke this step due to missing MSVC v142 C++ build tools. Fixed to the prior working version till a fix is issued.
steps:
- cached-checkout
- attach_workspace:
Expand Down
2 changes: 0 additions & 2 deletions .circleci/scripts/connector-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,11 @@ csi:

archicad:
- build-archicad-add-on:
e: win/server-2019
archicadversion: "25"
requires:
- get-ci-tools
name: build-archicad-add-on-25
- build-archicad-add-on:
e: win/server-2019
archicadversion: "26"
requires:
- get-ci-tools
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
},
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.defaultLaunchSolution": "SDK.slnf",
"[dotnet][xml]": {
"editor.defaultFormatter": "ms-dotnettools.csharp",
"editor.tabSize": 2
},
"xml.format.spaceBeforeEmptyCloseTag": false
"xml.format.spaceBeforeEmptyCloseTag": false,
"dotnet.defaultSolution": "SDK.slnf"
}
60 changes: 60 additions & 0 deletions All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectorTeklaStructures202
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConverterTeklaStructures2023", "Objects\Converters\ConverterTeklaStructures\ConverterTeklaStructures2023\ConverterTeklaStructures2023.csproj", "{EB52E451-9ED8-460E-9EE4-6717BFB12EAB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestsPerformance", "Core\TestsPerformance\TestsPerformance.csproj", "{4D1C70D7-FFD5-4518-A374-2A23E020D416}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectorAdvanceSteel2024", "ConnectorAutocadCivil\ConnectorAdvanceSteel2024\ConnectorAdvanceSteel2024.csproj", "{3B9189B9-E485-448A-8793-9B9587A36791}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConverterAdvanceSteel2024", "Objects\Converters\ConverterAutocadCivil\ConverterAdvanceSteel2024\ConverterAdvanceSteel2024.csproj", "{737D5567-7B1F-410D-9B7B-BAE8065ED15B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Mac|Any CPU = Debug Mac|Any CPU
Expand Down Expand Up @@ -1985,6 +1991,54 @@ Global
{EB52E451-9ED8-460E-9EE4-6717BFB12EAB}.Release|Any CPU.Build.0 = Release|Any CPU
{EB52E451-9ED8-460E-9EE4-6717BFB12EAB}.Release|x64.ActiveCfg = Release|Any CPU
{EB52E451-9ED8-460E-9EE4-6717BFB12EAB}.Release|x64.Build.0 = Release|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug Mac|x64.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug|x64.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Debug|x64.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release Mac|Any CPU.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release Mac|Any CPU.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release Mac|x64.ActiveCfg = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release Mac|x64.Build.0 = Debug|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release|Any CPU.Build.0 = Release|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release|x64.ActiveCfg = Release|Any CPU
{4D1C70D7-FFD5-4518-A374-2A23E020D416}.Release|x64.Build.0 = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug Mac|x64.Build.0 = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug|x64.ActiveCfg = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Debug|x64.Build.0 = Debug|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release Mac|Any CPU.ActiveCfg = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release Mac|Any CPU.Build.0 = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release Mac|x64.ActiveCfg = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release Mac|x64.Build.0 = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release|Any CPU.Build.0 = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release|x64.ActiveCfg = Release|Any CPU
{3B9189B9-E485-448A-8793-9B9587A36791}.Release|x64.Build.0 = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug Mac|Any CPU.ActiveCfg = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug Mac|Any CPU.Build.0 = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug Mac|x64.ActiveCfg = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug Mac|x64.Build.0 = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug|x64.ActiveCfg = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Debug|x64.Build.0 = Debug|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release Mac|Any CPU.ActiveCfg = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release Mac|Any CPU.Build.0 = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release Mac|x64.ActiveCfg = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release Mac|x64.Build.0 = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release|Any CPU.Build.0 = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release|x64.ActiveCfg = Release|Any CPU
{737D5567-7B1F-410D-9B7B-BAE8065ED15B}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -2127,6 +2181,7 @@ Global
{8AD2EA4F-14FB-4BB6-94CD-932630DFED9C} = {C73C19B5-72A3-4C63-8D56-0A7E7DB46CA5}
{EA34AC83-5825-4473-A572-D5127FD33B1B} = {C73C19B5-72A3-4C63-8D56-0A7E7DB46CA5}
{521A7D9C-637F-4965-A6E6-BA96DF99807D} = {C73C19B5-72A3-4C63-8D56-0A7E7DB46CA5}
{61C1304B-ED48-456B-AB90-A89066187952} = {C73C19B5-72A3-4C63-8D56-0A7E7DB46CA5}
{071F914C-F473-4FB2-9FAF-98632AFB164B} = {C73C19B5-72A3-4C63-8D56-0A7E7DB46CA5}
{54E90327-5F48-468D-9349-17AACEAA0A77} = {25F45C77-279F-4608-86D1-87345EC42CB4}
{6499CA05-6864-47AE-9204-B11B10C23417} = {25F45C77-279F-4608-86D1-87345EC42CB4}
Expand All @@ -2137,6 +2192,9 @@ Global
{B4D6F6DC-0712-4F9F-A24F-6B76DAE84B6F} = {BE521908-7944-46F3-98BF-B47D34509934}
{511C2FB0-9C73-4AC9-BA59-C8A84C089C59} = {18C8730C-0173-4987-9416-46F86EC20541}
{EB52E451-9ED8-460E-9EE4-6717BFB12EAB} = {5D988C50-8E85-402A-9020-A4AB0565F0C9}
{4D1C70D7-FFD5-4518-A374-2A23E020D416} = {8AA78EE8-C33B-4BC5-992A-E5DE7AB0BEC7}
{3B9189B9-E485-448A-8793-9B9587A36791} = {7B7C4CB1-3D60-4A5B-9902-C812521A24B3}
{737D5567-7B1F-410D-9B7B-BAE8065ED15B} = {BE521908-7944-46F3-98BF-B47D34509934}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1D43D91B-4F01-4A78-8250-CC6F9BD93A14}
Expand All @@ -2160,6 +2218,7 @@ Global
Objects\Converters\ConverterRevit\ConverterRevitShared\ConverterRevitShared.projitems*{2dcd648d-dca5-4d2a-8b14-ad2cb85d24b0}*SharedItemsImports = 13
ConnectorBentley\ConnectorBentleyShared\ConnectorBentleyShared.projitems*{372d9f0f-ede9-4050-bf8c-758911c5c2e0}*SharedItemsImports = 13
ConnectorTeklaStructures\ConnectorTeklaStructuresShared\ConnectorTeklaStructuresShared.projitems*{3af1ef30-0906-4926-a02c-4e3ad666352a}*SharedItemsImports = 5
ConnectorAutocadCivil\ConnectorAutocadCivil\ConnectorAutocadCivilShared.projitems*{3b9189b9-e485-448a-8793-9b9587a36791}*SharedItemsImports = 5
Objects\Converters\ConverterRhinoGh\ConverterRhinoGhShared\ConverterRhinoGhShared.projitems*{3cdef4cc-2cfa-4939-8427-3ed00fa9db55}*SharedItemsImports = 5
Objects\Converters\ConverterDynamo\ConverterDynamoShared\ConverterDynamoShared.projitems*{3df12639-78b6-41b3-a046-a675035369be}*SharedItemsImports = 5
ConnectorAutocadCivil\ConnectorAutocadCivil\ConnectorAutocadCivilShared.projitems*{3e30d170-3cb4-4728-97d5-887c5019da9b}*SharedItemsImports = 5
Expand Down Expand Up @@ -2187,6 +2246,7 @@ Global
ConnectorTeklaStructures\ConnectorTeklaStructuresShared\ConnectorTeklaStructuresShared.projitems*{67157264-aaa5-46a8-a38b-16254b49b892}*SharedItemsImports = 5
Objects\Converters\ConverterDynamo\ConverterDynamoShared\ConverterDynamoShared.projitems*{67a463d3-e98b-4b16-b069-d7bbb05386a1}*SharedItemsImports = 5
Objects\Converters\ConverterRevit\ConverterRevitShared\ConverterRevitShared.projitems*{67a463d3-e98b-4b16-b069-d7bbb05386a1}*SharedItemsImports = 5
Objects\Converters\ConverterAutocadCivil\ConverterAutocadCivilShared\ConverterAutocadCivilShared.projitems*{737d5567-7b1f-410d-9b7b-bae8065ed15b}*SharedItemsImports = 5
ConnectorNavisworks\ConnectorNavisworks\ConnectorNavisworks.Shared.projitems*{74e39841-b2fa-494d-ac40-a6e505de6b33}*SharedItemsImports = 5
Objects\Converters\ConverterRevit\ConverterRevitShared\ConverterRevitShared.projitems*{76937388-bc9e-4083-9d6e-59cc627e3804}*SharedItemsImports = 5
ConnectorNavisworks\ConnectorNavisworks\ConnectorNavisworks.Shared.projitems*{77d4f346-aca5-42c8-8522-5ef176f3adf1}*SharedItemsImports = 5
Expand Down
4 changes: 2 additions & 2 deletions ConnectorArchicad/AddOn/Sources/AddOn/AddOnMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include "Commands/GetElementBaseData.hpp"
#include "Commands/GetObjectData.hpp"
#include "Commands/GetSlabData.hpp"
#include "Commands/GetRoomData.hpp"
#include "Commands/GetRoofData.hpp"
#include "Commands/GetShellData.hpp"
#include "Commands/GetSkylightData.hpp"
#include "Commands/GetProjectInfo.hpp"
#include "Commands/GetSubElementInfo.hpp"
#include "Commands/GetZoneData.hpp"
#include "Commands/CreateWall.hpp"
#include "Commands/CreateDoor.hpp"
#include "Commands/CreateWindow.hpp"
Expand Down Expand Up @@ -198,12 +198,12 @@ static GSErrCode RegisterAddOnCommands ()
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetColumnData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetElementBaseData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetObjectData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetRoomData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetRoofData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetShellData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetSkylightData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetSlabData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetProjectInfo> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::GetZoneData> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::CreateWall> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::CreateDoor> ()));
CHECKERROR (ACAPI_Install_AddOnCommandHandler (NewOwned<AddOnCommands::CreateWindow> ()));
Expand Down
11 changes: 9 additions & 2 deletions ConnectorArchicad/AddOn/Sources/AddOn/Commands/CreateZone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ GSErrCode CreateZone::GetElementFromObjectState (const GS::ObjectState& os,
ACAPI_ELEMENT_MASK_SET (mask, API_ZoneType, poly.nArcs);

zoneShape.SetToMemo (memo, Objects::ElementShape::MemoMainPolygon);

element.zone.manual = true;
ACAPI_ELEMENT_MASK_SET (mask, API_ZoneType, manual);
}

if (os.Contains (Room::Height)) {
Expand All @@ -68,11 +71,15 @@ GSErrCode CreateZone::GetElementFromObjectState (const GS::ObjectState& os,

// The name and number of the zone
if (os.Contains (Room::Name)) {
os.Get (Room::Name, element.zone.roomName);
GS::UniString str;
os.Get (Room::Name, str);
GS::ucscpy (element.zone.roomName, str.ToUStr ());
ACAPI_ELEMENT_MASK_SET (mask, API_ZoneType, roomName);
}
if (os.Contains (Room::Number)) {
os.Get (Room::Number, element.zone.roomNoStr);
GS::UniString str;
os.Get (Room::Number, str);
GS::ucscpy (element.zone.roomNoStr, str.ToUStr ());
ACAPI_ELEMENT_MASK_SET (mask, API_ZoneType, roomNoStr);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GS::ErrCode GetDataCommand::ExportClassificationsAndProperties (const API_Elemen

{
GS::UniString typeName;
err = Utility::GetTypeNameFromElementType(elem.header, typeName);
err = Utility::GetLocalizedElementTypeName (elem.header, typeName);
if (err != NoError)
return err;

Expand Down
31 changes: 31 additions & 0 deletions ConnectorArchicad/AddOn/Sources/AddOn/Commands/GetElementIds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,31 @@ static GS::Array<API_Guid> GetAllElementGuids ()
}


static GS::Array<API_Guid> GetElementsFilteredByElementTypes (GS::Array<GS::UniString>& elementTypes)
{
GS::Array<API_Guid> filteredGuids;
GS::Array<API_Guid> elementGuids;
GSErrCode err = ACAPI_Element_GetElemList (API_ZombieElemID, &elementGuids, APIFilt_OnVisLayer | APIFilt_In3D);
if (err == NoError) {
for (const API_Guid& guid : elementGuids) {
if (Utility::IsElement3D (guid)) {
API_Elem_Head elementHead = {};
elementHead.guid = guid;
err = ACAPI_Element_GetHeader (&elementHead);
if (err != NoError)
continue;

GS::UniString elementTypeName;
Utility::GetNonLocalizedElementTypeName (elementHead, elementTypeName);
if (elementTypes.Contains (elementTypeName))
filteredGuids.Push (guid);
}
}
}
return filteredGuids;
}


GS::String GetElementIds::GetName () const
{
return GetElementIdsCommandName;
Expand All @@ -67,6 +92,12 @@ GS::ObjectState GetElementIds::Execute (const GS::ObjectState& parameters, GS::P
elementGuids = GetSelectedElementGuids ();
else if (elementFilter == "All")
elementGuids = GetAllElementGuids ();
else if (elementFilter == "ElementType") {
GS::Array<GS::UniString> elementTypes;
parameters.Get (ElementBase::FilterBy, elementTypes);
if(elementTypes.GetSize() > 0)
elementGuids = GetElementsFilteredByElementTypes (elementTypes);
}

const auto& listAdder = retVal.AddList<GS::UniString> (ElementBase::ApplicationIds);
for (const API_Guid& guid : elementGuids) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "GetRoomData.hpp"
#include "GetZoneData.hpp"
#include <locale>
#include "ResourceIds.hpp"
#include "ObjectState.hpp"
Expand All @@ -14,19 +14,19 @@ namespace AddOnCommands
{


GS::String GetRoomData::GetFieldName () const
GS::String GetZoneData::GetFieldName () const
{
return Zones;
}


API_ElemTypeID GetRoomData::GetElemTypeID () const
API_ElemTypeID GetZoneData::GetElemTypeID () const
{
return API_ZoneID;
}


GS::ErrCode GetRoomData::SerializeElementType (const API_Element& element,
GS::ErrCode GetZoneData::SerializeElementType (const API_Element& element,
const API_ElementMemo& memo,
GS::ObjectState& os) const
{
Expand Down Expand Up @@ -60,30 +60,39 @@ GS::ErrCode GetRoomData::SerializeElementType (const API_Element& element,

// The base point of the room
double level = Utility::GetStoryLevel (element.zone.head.floorInd) + element.zone.roomBaseLev;
os.Add (Room::BasePoint, Objects::Point3D (0, 0, level));
{
Geometry::Polygon2DData polygon;
Utility::ConstructPoly2DDataFromElementMemo (memo, polygon);

const Box2DData boundingBox = polygon.boundBox;
GS::Array<Sector> sectors;
bool res = Geometry::IntersectLineWithPolygon (polygon,
boundingBox.GetMidPoint(),
boundingBox.GetWidth() > boundingBox.GetHeight() ? Vector2D (1.0, 0.0) : Vector2D (0.0, 1.0),
&sectors);

Geometry::FreePolygon2DData (&polygon);

Objects::Point3D basePoint (0, 0, level);
if (res && sectors.GetSize() > 0) {
Sector sector = sectors[sectors.GetSize() / 2];
basePoint = Objects::Point3D (sector.GetMidPoint ().GetX (), sector.GetMidPoint ().GetY (), level);
}

os.Add (Room::BasePoint, Objects::Point3D (basePoint.x, basePoint.y, basePoint.z));
}
os.Add (ElementBase::Shape, Objects::ElementShape (element.zone.poly, memo, Objects::ElementShape::MemoMainPolygon, level));

// double polyCoords [zone.poly.nCoords*3];
//
// for (Int32 point_index = 0, coord_index = 0; point_index < zone.poly.nCoords; ++point_index, coord_index+=3)
// {
// const API_Coord coord = (*memo.coords)[point_index];
// polyCoords[coord_index] = coord.x;
// polyCoords[coord_index+1] = coord.y;
// polyCoords[coord_index+2] = level;
// }

// Room Props
os.Add (Room::Height, element.zone.roomHeight);
os.Add (Room::Area, quantity.zone.area);
os.Add (Room::Volume, quantity.zone.volume);


return NoError;
}


GS::String GetRoomData::GetName () const
GS::String GetZoneData::GetName () const
{
return GetRoomDataCommandName;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef GET_ROOM_DATA_HPP
#ifndef GET_ROOM_DATA_HPP
#define GET_ROOM_DATA_HPP

#include "GetDataCommand.hpp"
Expand All @@ -7,7 +7,7 @@
namespace AddOnCommands {


class GetRoomData : public GetDataCommand {
class GetZoneData : public GetDataCommand {
GS::String GetFieldName () const override;
API_ElemTypeID GetElemTypeID () const override;
GS::ErrCode SerializeElementType (const API_Element& elem,
Expand All @@ -22,4 +22,4 @@ class GetRoomData : public GetDataCommand {
}


#endif
#endif
1 change: 1 addition & 0 deletions ConnectorArchicad/AddOn/Sources/AddOn/FieldNames.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static const char* ApplicationId = "applicationId";
static const char* ApplicationIds = "applicationIds";
static const char* ParentElementId = "parentApplicationId";
static const char* ElementFilter = "elementFilter";
static const char* FilterBy = "filterBy";
static const char* ElementType = "elementType";
static const char* ElementTypes = "elementTypes";
static const char* Elements = "elements";
Expand Down
11 changes: 6 additions & 5 deletions ConnectorArchicad/AddOn/Sources/AddOn/ResourceIds.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#ifndef RESOURCEIDS_HPP
#define RESOURCEIDS_HPP

#define ID_ADDON_INFO 32000
#define ID_ADDON_MENU 32500
#define ID_DEFAULT_STORY_FORMAT 32800
#define ID_LOG_MESSAGES 33000
#define ID_ELEMENT_TYPE_STRINGS 34000
#define ID_ADDON_INFO 32000
#define ID_ADDON_MENU 32010
#define ID_DEFAULT_STORY_FORMAT 32020
#define ID_LOG_MESSAGES 33030
#define ID_ELEMENT_TYPE_STRINGS 32040
#define ID_FIX_ELEMENT_TYPE_STRINGS 32050

#define ID_LOG_MESSAGE_LIBPART_SEARCH_ERROR 1
#define ID_LOG_MESSAGE_ATTRIBUTE_SEARCH_ERROR 2
Expand Down
6 changes: 6 additions & 0 deletions ConnectorArchicad/AddOn/Sources/AddOn/ResourceStrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ const GS::UniString& ResourceStrings::GetElementTypeStringFromResource (const El
{
return TGetStringFromResource<ResourceStrings::ElementTypeStringItems> (ID_ELEMENT_TYPE_STRINGS, resourceItemId);
}


const GS::UniString& ResourceStrings::GetFixElementTypeStringFromResource (const ElementTypeStringItems& resourceItemId)
{
return TGetStringFromResource<ResourceStrings::ElementTypeStringItems> (ID_FIX_ELEMENT_TYPE_STRINGS, resourceItemId);
}
Loading

0 comments on commit b74b2cc

Please sign in to comment.