About the LP_XMLConverter

The LP_XMLConverter is a tool that is supplied with every ArchiCAD installation.
It is a command-line tool that is used to convert GSM files to XML files and vice versa.

Since GSM files are binary files, they cannot be edited with text editors, but only within ArchiCAD. This is not the case with XML files: these can be edited with text editors and, for example, you can make changes across entire libraries using batch routines with find and replace, which is not possible within ArchiCAD.

Furthermore, scripts can also be edited within an XML file, which is possible with the help of GDLnucleus or also with the help of the new HSF conversion method of the converter since ArchiCAD 23.
This HSF conversion does exactly the same thing that GDLnucleus does: it breaks down the entire XML file into its components, namely individual scripts, parameter list, and image file sections.

A very important function of the XML_Converter is the ability to convert GDL objects backwards, i.e. from ArchiCAD 23 to 22, for example. To do this, the expression "-compatibility 22" must be added to the command line, see the example below.

Another important function is the ability to embed graphic files (pixel files) into GSM files in binary form. This allows you, for example, to embed all graphics for the user interface into the object.

Automations in MAC OS

On MAC OS, you can use Automator functions to bypass the command line on the Terminal for conversion and convert individual files or entire folder structures via context menu.

To convert GSM to XML, proceed as follows:

  • Create, for example, 2 folders on the Desktop: "LibraryGDL" and "LibraryXML"
  • Start Automator and create a new "Quick Action" from the available selection.
  • In the right window pane at the top, set the following:
  • Then select "Copy Finder Items" in the 2nd column and enter the following as an example:
  • Then select "Run Shell Script" in the 2nd column and enter the following as an example:

Contents/MacOS/
./LP_XMLConverter l2x -compatibility 22 /Users/Hannes/Desktop/LibraryGDL/ /Users/Hannes/Desktop/LibraryXML/

  • Then save the file "GDL2XML_23_to_22"
  • This routine will then be available in the Finder's context menu.
  • When converting any GSM file or folder structure, the result is always placed in the "LibraryXML" folder.

To convert XML to GSM, proceed as follows:

  • Start Automator and create a new "Quick Action" from the available selection.
  • In the right window pane at the top, set the following:
  • Then select "Run Shell Script" in the 2nd column and enter the following as an example:

cd /Applications/GRAPHISOFT/AC22/ArchiCAD\ 22.app/Contents/MacOS/LP_XMLConverter.app/Contents/MacOS/
./LP_XMLConverter x2l /Users/Hannes/Desktop/LibraryXML/ /Users/Hannes/Desktop/LibraryGDL/

  • Then save the file "XML2GDL_22.workflow"
  • This routine will then be available in the Finder's context menu.
  • When converting any XML file or folder structure located in the "LibraryXML" folder, the result is always placed in the "LibraryGDL" folder (please delete the old GSM files there beforehand)