cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

How to set custom parameters through the program of my Add-On?

luna
Contributor

Hi, all!

 

I need to create an Add-On which function is to set new parameters for an object, that means I don't need to open the parameter setting interface, but rather set it in my Add-On.

In short, how can I use a program to add parameters to an object and get custom parameters through the program.

 

I don't know if I'm making myself clear.

After understanding the relevant issues, I think it may be related to GDL, but I needed some help.

 

Allen.

4 REPLIES 4
poco2013
Mentor

If you are referring to the C++ Development API, then the examples that you want to look at in the development kit are : Element_test and Property_test. This code allows creation and modification of custom properties.

 

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
luna
Contributor

Thanks for your reply.

 

I tried these two examples, but when I clicked to create the attribute, there was no response. I think I should get an interface similar to a dialog for me to set up something, but it doesn't.

I am developing using Visual Studio 2017&ARCHICAD24. Do I need to configure any other environments, such as GDL tools or dialog settings?

 

ac2.png

 

 

Allen.

poco2013
Mentor

I mentioned the two examples  for the example code needed the accomplish the various configurations of custom properties. Unfortunately, Graphisoft's examples usually do not provide any user feedback other than writing to the session report or to the debug window.  You have to configure this yourself. However both examples include the  UserItemDialog which you can use for feedback, or you can use a message box as in ACAPI_WriteReport(" ",true,...), but in all cases, you have to configure that yourself. FYI, to run my examples, I always use a Python script to provide the feedback. I'm guessing that's more than you would like to get into? WriteReport is the easiest to use and is quite helpful in debugging and as a alternate to the Debugger in VS which does not seem to work with the latest  versions and is pretty much being ignored right now.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

I always thought it was my configuration issue, but now I can move forward.

Thank you.

 

Allen.