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, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki, MOREH Tamas, Akos Somorjai

Hello Everyone,
I want to create an add-on that will read the geometry data from JSON(s) and create the equivalent library object. i have multiple JSONs inside a directory and i want to process them one at a time and create library objects from them.

My idea as of now is to use the new-file/save event handler to create one object in the form of morph and then save it.

if there any way i can create the GDL object instead of morph objects like this.
I also have some parameters related to these objects as well. how can i set these parameters to these objects.

Edit - I forgot to mention that I have gone through the create library part as mentioned in the example librarypart_test but in that we have to put the GDL script as a text string in which we have the values (example radius of cylinder) as hard coded.
i want a general solution where i have multiple files with data in the form of mesh triangles( coordinates for vertices and indices) and data in the form of polylines to create shapes generated from polylines like extrude,revolve and such.

- I hope i was able to make my question clear.
-Thanks in Advance.