Displaying Object Tool window programmatically
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-02-09
08:33 PM
- last edited on
‎2021-09-14
09:58 AM
by
Noemi Balogh
‎2021-02-09
08:33 PM
Hello,
I have a library with some custom objects in it. Is there any way to command the add-on to display the 'Object Tool' window so the user can just pick the object and place it in the project? Also, if it's possible, can I highlight the contents of the library so the user would not have to look for it in the library tree?
I have a library with some custom objects in it. Is there any way to command the add-on to display the 'Object Tool' window so the user can just pick the object and place it in the project? Also, if it's possible, can I highlight the contents of the library so the user would not have to look for it in the library tree?
Labels:
- Labels:
-
Add-On (C++)
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-02-22 08:40 PM
‎2021-02-22
08:40 PM
So, I got the answer to the first question after extensive search and some outside help.
It turns out that I want to use ACAPI_Interface function like in the example fromhttps://archicadapi.graphisoft.com/documentation/apiio_objectsettingsid
However, the part where it says about filtering is unclear to me because I can't get it to work. Either the filtering is not working the way I would think or I'm doing something wrong.
Here's what I already have:
Could someone help me from here, please?
It turns out that I want to use ACAPI_Interface function like in the example from
However, the part where it says about filtering is unclear to me because I can't get it to work. Either the filtering is not working the way I would think or I'm doing something wrong.
Here's what I already have:
void MyFunction(const uchar_t* name) { API_LibPart part; BNZeroMemory(&part, sizeof(API_LibPart)); lstrcpy(part.file_UName, name); GSErrCode err = ACAPI_LibPart_Search(&part, false); if (err == NoError) { API_ObjectSettingsPars api_objSetPars; BNZeroMemory(&api_objSetPars, sizeof(API_ObjectSettingsPars)); api_objSetPars.elemDef.header.typeID = API_ObjectID; CHCopyC(part.ownUnID, api_objSetPars.subtypeID); err = ACAPI_Interface(APIIo_ObjectSettingsID, &api_objSetPars); if (err == NoError) { // do sth with the element } } }The window pops up but there's no filtering at all. It just shows everything that's in the whole library (chairs, tables and other decorative stuff).
Could someone help me from here, please?