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

Automate LP_XMLConverter with Python

Mathias Jonathan
Advocate
 

Hi everybody!

 

I discovered the LP_XMLConverter (https://gdl.graphisoft.com/tips-and-tricks/how-to-use-the-lp_xmlconverter-tool) and used it for my coding need (extract images, coding in VStudio Code, modifying and compile multiple object at the same time...).

 

I use it with a terminal as required, typing some command, but I was thinking of creating a python script with an interface to help me  to use it.

 

Has anyone ever done something similar?
I'm quite a beginner to python (and in coding in general), and I'm not sure where to look/if it is possible.

If I understand correctly, the subject/difficulty would be to be able to pass commands to the executable file as you would with the command prompt.

 

Thanks!

3 REPLIES 3

Hi Mathias,

 

I think a good start is the Python module called subprocess to pass the commands.

An this chapter in "Automate the boring stuff with Python" (Paragraph titled: Launching Other Programs from Python) should give a nice introduction to it.

Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: bschwb.com
Joachim Suehlo
Advisor

Something similar I did with gdlnucleus for MAC:

https://gdlnucleus.com/
The first version for Sublime text is for free download (older Python version), the VSC-version costs 25,- Euro.

Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
gustavorochakv
Booster

 

You might want to take a look at the Builder class from this file from runxel sublime text addon: https://github.com/runxel/GDL-sublime/blob/master/GDL.py

 

Another thing worth mentioning is that the Library Dev Kit available on the Graphisoft Developer website has the documentation for the LP XML tool with some additional information that can be useful when doing this kind of stuff (eg, it tells you the char limit of the password field when encrypting the gsm).

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!