Archicad Python API
About automating tasks in Archicad using the Python API.

SaveAs .obj (or .treejs)

gehairing
Participant
Hello all

I try to build a 3D preview from current selected object.
I have seen the ACAPI_Automate (APIDo_SaveID, ...) call but it seem's limited to the API_FTypeID list.

Is there another way to do a SaveAs for exporting the current selected item (or even all the current 3D model) to a .obj format.

In the File->Save As... command we have the .obj export.

Thanks.
4 REPLIES 4
Ralph Wessel
Mentor
gehairing wrote:
Is there another way to do a SaveAs for exporting the current selected item (or even all the current 3D model) to a .obj format.
In the File->Save As... command we have the .obj export.
Just to clarify – do you want to add your own export filter to the "Save As…" dialog from the 3D window? For saving as .obj?
Ralph Wessel BArch
gehairing
Participant
Hi Ralph,

No.

I'm uploading some LibraryParts on a distant server and i want to add a 3D preview of the library part.
Ralph Wessel
Mentor
gehairing wrote:
I'm uploading some LibraryParts on a distant server and i want to add a 3D preview of the library part.
It depends on the required format for the data. You could temporarily place an instance of the library part in the project and extract its 3D geometry through ModelAccess or 3D Manager API. The temporary object can be deleted afterward. But then you would need to convert that data to the required output format.
Ralph Wessel BArch
Akos Somorjai
Graphisoft
Graphisoft
Ralph wrote:
gehairing wrote:
I'm uploading some LibraryParts on a distant server and i want to add a 3D preview of the library part.
It depends on the required format for the data. You could temporarily place an instance of the library part in the project and extract its 3D geometry through ModelAccess or 3D Manager API. The temporary object can be deleted afterward. But then you would need to convert that data to the required output format.
Actually the Wavefront add-on exports its functionality through add-on communication (take a look at the Communication_Manager / Communication_Client examples in the the devkit).

The ID of the command is 'OBJO', its version is 1, and it expects a pointer to a correctly filled API_IOParams structure in the parameters. Just make sure you'll start your command from above the 3D Window with only your current object in it.

Best, Ákos

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!