The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, Mihály Palenik, Tibor Lorántfy, MOREH Tamas, Akos Somorjai, Ed Brown

By ufoname
#281579
Hello, do not tell me how to get the parameters of the global GDL object.
Or how to get it GUID and INDEX (further with parameters I think I will understand as with usual GDL)
This object is created and loaded in the library it is present in the view parameters, by means of ARCHICAD I can only learn some GUID pair {0731FA34-C21E-4B47-9F0F-E71912128886} - {FF5231F5-3E29-48FC-BAF7-81856675376A} of the library element, although I doubt that it will be useful to find the placed element in the view parameters.
#281602
There's a workaround for that – because GDL objects can read these values, you can use one to extract the parameters for you. Write a script that will copy the parameters you need into its own parameters when a certain parameter is set. Then the object should reset that parameter.

The add-on can set the parameter and cause the script to run without placing it in the model, and then extract the copied parameters. Take a look at the documentation for APIAny_OpenParametersID and APIAny_ChangeAParameterID.
#281710
Ralph Wessel wrote:The add-on can set the parameter and cause the script to run without placing it in the model, and then extract the copied parameters


Thanks Ralph Wessel. It worked. Although I did not quite understand what you meant about manipulating a certain parameter, it's obvious it's just for checking that the creaking in the GDL worked.
The main thing though is that you can not place the object and the script works directly from the library.
During the experiments it was found out that in gdl it is possible to force to work all with one library element, the main thing to use in a GDL script LIBRARYGLOBAL PARAMETERS. But, just in case, I made 2 elements to escape any recursive ones.