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

Global Variables

poco2013
Mentor
Just wondering if it would be possible to create a series of global variables or properties which could be accessible by any other ADD-Ons and exist for the life of the Plan?

If so, could those same global properties be used to reference that info within a standard schedule?

The purpose of such "global" properties would be to accumulate such plan wide information such as area analysis , quantities, costs. etc. etc.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
4 REPLIES 4
Ralph Wessel
Mentor
poco2013 wrote:
Just wondering if it would be possible to create a series of global variables or properties which could be accessible by any other ADD-Ons and exist for the life of the Plan?

If so, could those same global properties be used to reference that info within a standard schedule?

The purpose of such "global" properties would be to accumulate such plan wide information such as area analysis , quantities, costs. etc. etc.
I don't think it's possible for an add-on to create project-based data that can be directly accessed by other add-ons. And it wouldn't be safe for multiple add-ons to modify that data without a common mechanism to manage it.

An add-on could provide access to the data via an external command or service, i.e. other add-ons could call it to get/set data if it provided a published command set.

However, I don't see any way for that data to interact directly with ARCHICAD's scheduling. There is no API to inject schedule content (to my knowledge).
Ralph Wessel BArch
poco2013
Mentor
Thanks Ralph

That's somewhat what I expected. But I found it useful in other programs, but -- yes- it can be a disaster if the user is not aware, particularly if multiple plans are open at the same time.

Still think it would solve a number of problems if used with caution.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Akos Somorjai
Graphisoft
Graphisoft
poco2013 wrote:
Just wondering if it would be possible to create a series of global variables or properties which could be accessible by any other ADD-Ons and exist for the life of the Plan?

If so, could those same global properties be used to reference that info within a standard schedule?

The purpose of such "global" properties would be to accumulate such plan wide information such as area analysis , quantities, costs. etc. etc.
If you aim for model element specific properties, then please take a look at the Properties API (new in ARCHICAD 20). These are accessible from all add-ons, can be created by one add-on, or put directly by a BIM Manager into the company template. Also, you can show them in schedules, export and import them to/from Excel, etc.

Regards, Akos
poco2013
Mentor
Thanks Akos

Yes --using properties, I am able to accumulate cost data for various object and summarize the same within schedules. Simply by following and a sight modification of the Property_test example in the API examples.

And by using "phantom" objects with their properties used as accumulators i am am to achieve the same. But, I think, user read/write GLOB variables would still be a more direct and understandable approach.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!