We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-12-11 06:01 PM - last edited on 2024-09-24 10:27 AM by Doreena Deng
Hi all, I'm kind of clueless on how the ui_infield{3} images work.
There's this Electric object in our local AC Library, in which each of the options hold a different picture icon:
I'm currently doing a few changes to that to give it a few more functionalities, (I started a new object and copied all content), and even if my version is perfectly identical in its Master, 2D, Parameters and Interface scripts, the pictures do not show:
I've seen in this page that those pictures come out of a 'picture_name', but where do those pictures are stored in a GDL object, so I can use them?
I'd like to know that so I can also create custom UI pictures for other GDL objects as well.
Thanks in advance!
Solved! Go to Solution.
2023-12-11 06:50 PM
To get your images into the object you must use the LP_XMLConverter.
It's a bit sad, that there is no way to do this directly in the GDL editor, but it is what it is.
2023-12-12 11:22 AM - edited 2023-12-12 11:22 AM
Hello @pedrocollares ,
If there is no .lcf archive associated to the first object or library folder linked to the library, then the pictures are embedded in the object thanks to the LP_XMLConverter.
If you want to extract them then you would need to use those commands in your terminal :
// For Windows
"C:\Program Files\GRAPHISOFT\ARCHICAD $VersionNumber\LP_XMLConverter.exe" libpart2xml -img "$imageFolderPath" "$binaryFilePath" "$xmlFilePath"
// For Mac
/Applications/GRAPHISOFT/ARCHICAD $VersionNumber/ARCHICAD $VersionNumber.app/Contents/MacOS/LP_XMLConverter.app/Contents/MacOS/LP_XMLConverter libpart2xml -img $imageFolderPath $binaryFilePath $xmlFilePath
This would extract the pictures to the $imageFolderPath
2023-12-11 06:50 PM
To get your images into the object you must use the LP_XMLConverter.
It's a bit sad, that there is no way to do this directly in the GDL editor, but it is what it is.
2023-12-12 02:00 AM
I have never used LP_XMLConverter.
I can't say I have used ui_infield{3} often, but I am sure I have at some time
Any images I use in the interfaced script, I just have them in my loaded libraries (my office library).
So long as the image files used in the UI script are in the loaded library, you should be able to see them.
If you add a new image to your library while working on an object, you need to reload the library.
Barry.
2023-12-12 11:22 AM - edited 2023-12-12 11:22 AM
Hello @pedrocollares ,
If there is no .lcf archive associated to the first object or library folder linked to the library, then the pictures are embedded in the object thanks to the LP_XMLConverter.
If you want to extract them then you would need to use those commands in your terminal :
// For Windows
"C:\Program Files\GRAPHISOFT\ARCHICAD $VersionNumber\LP_XMLConverter.exe" libpart2xml -img "$imageFolderPath" "$binaryFilePath" "$xmlFilePath"
// For Mac
/Applications/GRAPHISOFT/ARCHICAD $VersionNumber/ARCHICAD $VersionNumber.app/Contents/MacOS/LP_XMLConverter.app/Contents/MacOS/LP_XMLConverter libpart2xml -img $imageFolderPath $binaryFilePath $xmlFilePath
This would extract the pictures to the $imageFolderPath
2023-12-12 12:13 PM
I prefer having the object independent of loaded libraries in this specific case, I'll give LP_XMLConverter a try. Thanks all! 🙂