Skip to content

Commit

Permalink
Do not use ElemID_To_Name because it returns non-localized name, use …
Browse files Browse the repository at this point in the history
…GetElementTypeNonLocalizedName instead
  • Loading branch information
tlorantfy committed Aug 20, 2024
1 parent fb9addd commit c95dffa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion archicad-addon/Sources/ElementCreationCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GS::ObjectState CreateElementsCommandBase::Execute (const GS::ObjectState& param
GS::ObjectState response;
const auto& elements = response.AddList<GS::ObjectState> ("elements");

const GS::UniString elemTypeName = ElemID_To_Name (elemTypeID);
const GS::UniString elemTypeName = GetElementTypeNonLocalizedName (elemTypeID);
const Stories stories = GetStories ();

ACAPI_CallUndoableCommand ("Create " + elemTypeName, [&] () -> GSErrCode {
Expand Down
17 changes: 0 additions & 17 deletions archicad-addon/Sources/MigrationHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,6 @@ inline GSErrCode ACAPI_LibraryPart_CloseParameters ()

#endif

inline const GS::UniString ElemID_To_Name (const API_ElemTypeID& typeID)
{
GS::UniString elemNameStr;

#ifndef ServerMainVers_2600
ACAPI_Goodies (APIAny_GetElemTypeNameID, (void*) typeID, &elemNameStr);
#else
#ifndef ServerMainVers_2700
ACAPI_Goodies_GetElemTypeName (typeID, elemNameStr);
#else
ACAPI_Element_GetElemTypeName (typeID, elemNameStr);
#endif
#endif

return elemNameStr;
}

#ifndef ServerMainVers_2600

inline GSErrCode ACAPI_IFC_GetIFCRelationshipData (API_IFCTranslatorIdentifier ifcTranslator, API_IFCRelationshipData ifcRelationshipData)
Expand Down

0 comments on commit c95dffa

Please sign in to comment.