cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

XML Converter Password

Lingwisyer
Guru
Hi all,

Does anyone know how to get the XML Converter to work with password protected objects?
"...\LP_XMLConverter.exe" libpart2xml "[object path]" "[save path]"
The Help option indicates the use of [-password pwd] but I cannot figure out where to place it. I am assuming I drop the square brackets?

I tried saving the object without a password, but it still returns a password error when I attempt to convert it...



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
9 REPLIES 9
runxel
Legend
It should work if you just put the command line parameter at the end of the command.

"...\LP_XMLConverter.exe" libpart2xml "object path" "save path" -password mysecret
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

It kinda worked but it keeps saying that I'm typing my password wrong (Mac terminal). Any ideas?

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

Keyboard layout?

[] are optional parameters, and their order among the other optional parameters doesn't matter.

[-cur file [-keepimagepath]] means the order is important.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

I've kept the order, no brackets, and I can actually see the password, so it's typed right. It has no special characters, just 8 random non-special characters. 

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

Did you manage to encrypt/decrypt through the command line?

 

If I try to decrypt a file it says "error: Could not decrypt library part (wrong password)" and if I instead try to encrypt a file through the command line the .gsm file is created without any password.

 

I've tried the LP_XMLConverter from different AC versions (23 and 26) and even the LP_XMLConverter shipped with the LibDev Toolkit and the result is the same. I've also tried quoted and unquoted passwords, trivial passwords without any special chars (12345) and I've ven tried to base64 encode the password (worth a shot...), but the outcome is always the same.

 

Peter Baksa
Graphisoft
Graphisoft

This works for me:

LP_XMLConverter hsf2libpart -password pwd sourcedir target.gsm

LP_XMLConverter libpart2hsf -password pwd target.gsm sourcedir

 

Please PM me with the object and the steps to reproduce if there is still a problem.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

I've figured it out, (I think) I've misread your previous post before: as it turns out, the order of oprional parameters doesn't matter amongst themselves, but they do need to be placed before the source/target parameters. 

I was doing the same as the OP and placing them at the end of the command, which is why it led to the same error

 

Here's a print of the command failing when password is the last parameter and succeeding when it is not.

gustavorochakv_2-1668785050902.png

 

I do find it a bit weird having to input optional parameters before (some) of the mandatory ones, but at least it's now working as expected.

 

This works! But it's not stated anywhere.


Please consider making it clear at:
https://gdl.graphisoft.com/tips-and-tricks/how-to-use-the-lp_xmlconverter-tool

Or even instructions like <Symbol [...] version="43"> at second line means it can be converted to AC25, <Symbol [...] version="41"> makes it able for Archicad 24.

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

Or even instructions like <Symbol [...] version="43"> at second line means it can be converted to AC25, <Symbol [...] version="41"> makes it able for Archicad 24.

Sometimes that works when we don't change the xml format. Use the -compatibility flag to convert to earlier versions.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest