We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

How to convert GDL object to XML using with LB_XML

Anonymous
Not applicable
Dear Archicad User i am doing some experiment how to convert GDL object to XML format using with LB_XML Converter Tools in (Lib Dev Tool kit).

Please Guide me if you know this procedure if will very helpfully for me .

thanks
23 REPLIES 23
Anonymous
Not applicable
Thanks Ralph, it worked perfectly.
owen
Newcomer
Ralph wrote:
To convert from XML to GDL, try something like this in the terminal:
cd /Applications/Graphisoft/LibDevToolkit\ 11/Tool/OSX/LP_XMLConverter.app/Contents/MacOS/

./LP_XMLConverter x2l /Users/rwessel/Desktop/LibraryXML/ /Users/rwessel/LibraryGDL/
...where LibraryXML is the folder containing the source XML and LibraryGDL is the destination of the converted parts. You would need to use the path to your installation of LP_XMLConverter of course.
I am having problems using the XML Converter to convert a batch of files to XML. Running the following command:
/Applications/Graphisoft/ArchiCAD\ 11/LibDevToolkit\ 11/Tool/OSX/LP_XMLConverter.app/Contents/MacOS/LP_XMLConverter 12x /Users/username/Desktop/ /Users/username/Desktop/
i get a 'Command line arguments error' everytime.

However i can convert the same objects individually using:
/Applications/Graphisoft/ArchiCAD\ 11/LibDevToolkit\ 11/Tool/OSX/LP_XMLConverter.app/Contents/MacOS/LP_XMLConverter libpart2xml /Users/username/Desktop/Test.gsm /Users/username/Desktop/Test.xml
Any ideas what the problem could be?

Also has anyone had any success in running these batch conversions via Automator?

cheers,

os
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Karl Ottenstein
Moderator
In your quoted code, you has 12x (twelve x) as the parameter to the tool

The correct parameter is l2x (letter "l" - as in libpart, 2 as in "to", "x" as in XML).

HTH,
Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
owen
Newcomer
Ah stupid mistake! Thought i had copied the code across from the HTML docs but i must have retyped part of it ... all good now

thanks Karl!

(and my what good eyes you have)
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Karl Ottenstein
Moderator
owen wrote:
(and my what good eyes you have)
Glad that was it! 🙂 But, no, my eyes are not that great - older I get, the more stuff I see that isn't really there! 😉 But, when GS introduced this tool several years ago, I had the same problem, because a one and an el looked the same in the font that they used, and they did not state the logic of the mnemonic clearly enough to get through my skull (xml-to-lib [x2l] and lib-to-xml [l2x]. If uppercase, it would have been more obvious - never did check to see if it accepted that parameter in either case...

Many cool things are possible with the xml copies on a Mac - from finding content via Spotlight, to using all of the various Unix tools to find/change things globally in multiple objects. Have fun.

Cheers,
Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Ralph Wessel
Mentor
owen wrote:
Also has anyone had any success in running these batch conversions via Automator?
Karl has done a great job of answering the first part of your query, so I'll tackle the rest. Yes, you can run this from Automator or any other tool which can run shell scripts, e.g. XCode or AppleScript. The former can be used to automatically build up to date libraries in conjunction with add-on builds. For Automator, look for the "Run Shell Script" action, and enter the same commands used in the Terminal.
Ralph Wessel BArch
Software Engineer Speckle Systems
owen
Newcomer
Karl & Ralph,

thanks for the help - have not figured out Automator yet (get an error running the same Terminal command via Run Shell Script) but im sure it is just user error 😉

More user-friendly GDL editing is a long standing wish .. are there any 3rd party apps you guys use for your editing or do you do it all in the ArchiCAD GDL editor? I was looking at BBEdit to edit (either the XML or just copy-paste the script) as it is possible AFAIK to create a custom language library/plugin to recognise GDL syntax/functions and format their display ... but i think that is a can of worms i'd rather not open (bit beyond me atm)
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Jochen Suehlo
Moderator
At
openGDL.org

you find a syntax scheme for PROTON Edtor (Windows)
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
owen
Newcomer
Joachim wrote:
At
openGDL.org

you find a syntax scheme for PROTON Edtor (Windows)
Thanks for the link .. i cannot seem to find Proton for download either on the Proton site nor on Versiontracker (missing file on Version Tracker). Is it still available?

Having a look at the syntax scheme it looks somewhat similar to a BBEdit Codeless Language Module (a .plist file). It has all the GDL commands & keywords up to AC10 so it could be a good start on creating one of these modules.

but maybe Graphisoft should do this if they aren't going to give us a better built-in editor soon?
cheers,

Owen Sharp

Design Technology Manager
fjmt | francis-jones morehen thorp

iMac 27" i7 2.93Ghz | 32GB RAM | OS 10.10 | Since AC5
Anonymous
Not applicable
Hello y'all,

I found this thread very helpful. After a few attempts I was able to convert libraries into xml, great. Thank you very, very much. Question: Is it possible to convert a library with it's full directory tree into one single xml-file (and back)? My goal would be to modify every objects in a library with a single stroke, using eg. applescript.

Thx a lot again and keep on rockin' in the free world.