2009-05-04 10:39 AM
2009-05-04 06:06 PM
mstrobl wrote:This is possible, but not easy. You also need to consider how worthwhile it will be, given that the objects will lose all their 'intelligence' (parameters and scripts) and become pure geometry with the default parameters for the object - is this useful?
I am looking for ways to automatically convert GSM files to other file types, preferably such as OBJ, 3DS or alike. Looking through the API, I have not really found any pointers on where to go. I would like to do this without user input, if possible.
Is such a form of batch conversion possible? Or do you know of any methods to use the API/other means to convert between file types away from Archicad's format?
2009-05-05 10:57 AM
If so, it is relatively simply to obtain the geometry of a batch of library parts. Simply iterate through the objects in the loaded library, placing one instance in the model, extracting the 2D/3D geometry, and finally deleting the instance. That leaves the problem of exporting the data in the required format. The DXF/DWG add-on can be driven by another add-on to export data in those formats, but I don't know about the add-ons for 3DS of OBJ. You may need to look for a 3rd party resource for that (or - worst case - develop your own).Thank you very much for your help, Ralph!
Take a look at
ACAPI_Element_ShapePrims to extract 2D geometry, and the ModelAccess API for 3D geometry.
2009-05-06 12:39 AM
mstrobl wrote:You can open a project with
I would like to automate the process further. What I'd like to do is to automatically convert more than one model, if possible with no user interaction at all.
To give an example, a very ideal scenario would be if I could instruct ArchiCAD via the command line to load a model and then to execute my plugin.