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.
SOLVED!

Using AddOn in 3D

Dayiz
Booster

Hello everyone!

 

I'm currently trying to write an AddOn which selects all tilted Walls in a project.

I managed to get the functionality running, but i'm only able to use the AddOn in 2D view, but as soon as i go in 3D, (e.g.: 3D Generic Perspective), the AddOn is greyed out.

 

Is this the general behavior or is there something I'm missing? Our architects need it in 3D view.

Thanks for any help!

 

Kind Regards

Dayiz

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Dayiz,

Are you talking about the menu item becoming gray?
Then I think you are looking for the menu control codes. For 3D views you can use "^E3" like in this example:

'STR#' 32500 "Menu string" {
/* [  1] */     "This would be enabled also in 3D views^E3"
}

You can find more details about it on this documentation page: https://archicadapi.Graphisoft.com/documentation/required-resources

Or in case you are creating a palette, you will need something like this

    GSErrCode err = ACAPI_RegisterModelessWindow (paletteRefId, PaletteAPIControlCallBack,
                                                  API_PalEnabled_FloorPlan + API_PalEnabled_3D
+ API_PalEnabled_DocumentFrom3D,
GSGuid2APIGuid (paletteGuid));

 (Details here: https://archicadapi.Graphisoft.com/documentation/acapi_registermodelesswindow)

Best,
Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: Archi-XT.com

View solution in original post

4 REPLIES 4
DGSketcher
Legend

You do know you can use Find & Select for this?

Screenshot 2022-11-21 at 23.02.39.png

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Solution

Hi Dayiz,

Are you talking about the menu item becoming gray?
Then I think you are looking for the menu control codes. For 3D views you can use "^E3" like in this example:

'STR#' 32500 "Menu string" {
/* [  1] */     "This would be enabled also in 3D views^E3"
}

You can find more details about it on this documentation page: https://archicadapi.Graphisoft.com/documentation/required-resources

Or in case you are creating a palette, you will need something like this

    GSErrCode err = ACAPI_RegisterModelessWindow (paletteRefId, PaletteAPIControlCallBack,
                                                  API_PalEnabled_FloorPlan + API_PalEnabled_3D
+ API_PalEnabled_DocumentFrom3D,
GSGuid2APIGuid (paletteGuid));

 (Details here: https://archicadapi.Graphisoft.com/documentation/acapi_registermodelesswindow)

Best,
Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: Archi-XT.com

Thank you very much, this is what I was looking for 🙂

Honestly no, I didnt. But I'm not an architect, just a developer 😄

But I think that tool wouldn't suffice. We also want to check for all multiples of 90° or 45° and also have the option to enter a project offset. While you could manually put in all those values, it would be easier to solve this problem with an addon.

But thanks for your input 🙂

Learn and get certified!