We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Wall Tool from favorite

dushyant
Enthusiast
Hello,
Is there a way to activate the wall tool for drawing the wall, with a particular favorite wall’s settings? I can place a favorite wall with begC and endC. But I need the wall tool to get activated with the favorite’s settings applied & ready to draw.

Basically from the menu: Design > Design Tools > Wall , should get activated and instead of Default Settings, it should be ready with the settings of a particular favorite wall.

Thanks,
Dushyant
25 REPLIES 25
dushyant
Enthusiast
Okay, so it gets the guid of an element which is there in the model already.
Don't you already have the Favorite classifications after calling ACAPI_Favorite_Get?
I was trying to get the favorite's classification using ACAPI_Element_GetClassificationItems , by creating: API_Element& favElement = favorite.element;
So how to get the classification of the favorite once I have something like:
ACAPI_Favorite_Get (&favorite); ?
Ralph Wessel
Mentor
dushyant wrote:
So how to get the classification of the favorite once I have something like:
ACAPI_Favorite_Get (&favorite); ?
They should be in favorite. classifications.
Ralph Wessel BArch
Software Engineer Speckle Systems
dushyant
Enthusiast
I tried it. It contains classifications of all the favorites in the project. Since I created this favorite by passing the name of a specific favorite (favName = "myFav"; API_Favorite favorite (favName); ), I thought it would contain only its classification. How do I get the one of a specific favorite?

for (auto i = favorite.classifications.Get().Begin(); i != favorite.classifications.Get().End(); ++i) {
favClassificationSystem.guid = i->first;
favClassificationItem.guid = i->second;
//ACAPI_WriteReport("\nfavClassificationSystem guid: %d\n favClassificationItem guid: %d\n", false, favClassificationSystem.guid, favClassificationItem.guid);
}
dushyant
Enthusiast
Any idea why favorite.classifications is having so many systemItemPairs?
Mihaly Palenik
Graphisoft
Graphisoft
Hello!

You should call New () on favorite.classification because this member is also an Optional.

Best regards,
Mihály
dushyant
Enthusiast
yes, thanks.