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

Auto dimensioning

Anonymous
Not applicable
Sorry this is a stupid question.

I want to dimension entire floor by using APX and dimensions are linked to walls.

Can you give me example code?
I want to know how to set segments to the API_DimensionType element’s chain?
How do I set memo of dimension element?
How do I set the wall element index to the dimension element such that if I move the wall dimension is moved and if I deleted one of the wall dimension is changed accordingly?

please give me sample code to produce fallowing dimension which is linked to walls.


dim.JPG

5 REPLIES 5
Karl Ottenstein
Moderator
I'm confused as to why you want to do this, since there is already a standard add-on that does exactly what you illustrate...?

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Thanks for your help.

I want to communicate Automatic Dimensioning.apx with my apx. But, I don’t know how to communicate with that apx. Can any one give me some samples code how to communicate with other apx?

Main aim of my auto dimensions is by clicking button in my own menu by user it will select the all walls and place the dimensions with out interacting with user.
Karl Ottenstein
Moderator
An add-on can 'expose' interface functionality only if it is designed to do so. Generally this is for a developer to have his/her own add-ons interact with one another.

I'm not aware of any GS or 3rd party add-ons that have a published interface.

So, you may have to resort to 'send keys' type of functionality, which as you know can be highly unreliable.

Others may have more positive suggestions for you, I hope! 😉

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Ralph Wessel
Mentor
Ranga wrote:
I want to communicate Automatic Dimensioning.apx with my apx. But, I don’t know how to communicate with that apx. Can any one give me some samples code how to communicate with other apx?

Main aim of my auto dimensions is by clicking button in my own menu by user it will select the all walls and place the dimensions with out interacting with user.
Look up 'ACAPI_Command_Call' in the API documentation. Also, look at 'Communication_Manager' in the API examples. The DXG-DWG add-on from GS supports interaction with other add-ons, but I don't know about Automatic Dimensioning. I doubt if it will communicate with another add-on, but you never know...

I still don't quite follow what improvement you're looking for over Automatic Dimensioning?
Ralph Wessel BArch
Software Engineer Speckle Systems
Akos Somorjai
Graphisoft
Graphisoft
Ranga wrote:
Thanks for your help.

I want to communicate Automatic Dimensioning.apx with my apx. But, I don’t know how to communicate with that apx. Can any one give me some samples code how to communicate with other apx?

Main aim of my auto dimensions is by clicking button in my own menu by user it will select the all walls and place the dimensions with out interacting with user.
Automatic Dimensioning at the moment doesn't expose any interface to other add-ons (it's a good idea, though ), and at the moment we don't have any plans to do that. Also, the API doesn't allow you to call any menu command
I'd go the easy way, tell the user to select all walls (or do a pre-selection from your add-on), and ask her/him to use the automatic dimensioning tool if this is acceptable for you.

HTH, Akos