BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Archicad C++ API
About Archicad add-on development using the C++ API.

Label Favorite

ReignBough
Enthusiast

I created a function that will generate a label based on favorite.

 

 

API_Favorite favTag = {};
favTag.name = "DOOR TAG";
favTag.memo.New();
favTag.properties.New();
favTag.classifications.New();
favTag.elemCategoryValues.New();
err = ACAPI_Favorite_Get(&favTag);
if (err != NoError)
{
    DebugPrintlnf("ACAPI_Favorite_Get failed (Name: DOOR SIGNAGE TAG)");
    ACAPI_DisposeElemMemoHdls(&favTag.memo.Get());
}
API_Element& elemTagDef = favTag.element;
API_ElementMemo& memoTagDef = favTag.memo.Get();
err = ACAPI_Element_Create(&elemTagDef, &memoTagDef);

 

 

But the generated tag (especially the "SYMBOL LABEL" part) is not the same as the favorite.

 

EDIT

I looked into the returned value of ACAPI_Favorite_Get() and found out that the value of textWay is still APIDir_Parallel. With this, I harcoded the value of textWay to APIDir_General and also the value of u.symbol.fixedAngle to 0. But the generated tag still uses APIDir_Parallel for textWay and 1 for u.symbol.fixedAngle.

~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
0 REPLIES 0
Learn and get certified!