GDL
About building parametric objects with GDL.

Change image-file used in the "ui_script" of lib-object?

Anonymous
Not applicable
Hi dear all,

how can I get a new image in an existing gsm-object? I want change an image, that is used in the UI-script (it shows some kind of 'quick-start-guide'-graphics).

It is only linked by its index (?) :
	ui_pict 1, 0, pageStartY 
When I convert the gsm to xml, I get the "hex-code"-image-part in the xml - but how I can place a new one there? How I can generate the "image-code" of the new picture, so I can put it in the xml and reconvert it to gsm?

It would be really great, if you can help me...

best regards from vienna,
Klaus
6 REPLIES 6
Barry Kelly
Moderator
I believe the image can be embedded with the XML converter, but I have never used that so someone else will need to explain that if it can be done.

However, if you don't need the image embedded in the object, instead of the image index number, just use the image name (in quotes).
So long as that image is in your loaded library, it can be used in this command.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
vdentello
Advocate
I really wish that was an integrated workflow, you'd have to extract it using the xml converter or convert it using the tool to get access to embbeded image files.
Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil
Joachim Suehlo
Advisor
The Visual Studio Code GDL Extension (from AC 24), the GDL sublime extension for Sublime Text (from AC 24) or GDLnucleus (for Sublime Text from AC 19) all can handle the routines to integrate images more or less automatically.
Joachim Suehlo . AC12-27 . MAC OSX 13.5 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
Thank you for your replys

- I managed it creating an object only containing the images -> I convert that gsm to xml - so I can grab the GDL_pict-code and the correct MIME settings - and the index is also created (and can be manipulated)... - than copying the grabbed cod behind the <picture-end tag> (previewpic) and setting the correct index to the "ui_pict - command".

Using the lp_xmlconverter on the command line is no stress for me - I often deal with it, as this is the only way to get ALL data of an lib-object (also GUID (!) and embedded elements)

for scripting and "bulk-processing" I use notepad++ - I like that swiss-army-knife - and I can do special operations and regex-replacements and so on..

best regards from vienna,
Klaus
Peter Baksa
Graphisoft
Graphisoft
Hi Klaus,

This short LP_XMLConverter tutorial writes about the technique to work with image files for built-in images. It is a simpler than hex data in the xml.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Anonymous
Not applicable
Dear Peter,

thank you for your hint how doing image embedding by using lp_xmlconverter -

I have guessed there must be a way without dealing with the image code, but do not konw how to handle it...

Thank you a lot

best regards from vienna,
Klaus

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!