Images in Objects user interface.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-01 02:46 AM
2011-04-01
02:46 AM
if bBranches then ui_pict 51, x, y, 114, 180, 1 ! ui_Fronded_tree2 else ui_pict 50, x, y, 114, 180, 1 ! ui_Fronded_tree1 endifIf I wanted to use the same image in another object, how would I do it, as the image doesn't seem to be in the macro library?
Many thanks!
7 REPLIES 7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-01 04:04 AM
2011-04-01
04:04 AM
Hi Peter,
I'd never noticed this. Manual says the index refers to an image embedded within the library part itself - not in the loaded lib.
I couldn't find a lib part in gsm format (production lib) that does this to look at - do you have the name of one?
The LibDevToolKit has some XML examples - where an XML tag refers to an external image and assigns it an index number. Apparently the XML converter then does the image embedding. Wonder if the gsm-to-XML converter can extract the image for you?
Here's the small bit of documentation I found:
Cheers,
Karl
I'd never noticed this. Manual says the index refers to an image embedded within the library part itself - not in the loaded lib.
I couldn't find a lib part in gsm format (production lib) that does this to look at - do you have the name of one?
The LibDevToolKit has some XML examples - where an XML tag refers to an external image and assigns it an index number. Apparently the XML converter then does the image embedding. Wonder if the gsm-to-XML converter can extract the image for you?
Here's the small bit of documentation I found:
The XML source of a library part may contain the following reference (you have to change the filename, mime type and the SubIdent fields) :In one XML sample part, I found a bunch of <GDLPict> definitions, and corresponding UI_Pict uses, referring to the same index/SubIdent numbers.
<GDLPict MIME="image/png" path="foldername/filename.png" SubIdent="3" platform="Win" SectVersion="19" SectionFlags="0">
</GDLPict>
You can create a reference to this image via the SubIdent (here it is 3) in the GDL script :
UI_INFIELD "parName", 0, 5, 302, 54,
1, 3, 5, 1, ! a "3"
56, 50, 40, 40,
1, "",
2, "",
3, "",
4, "",
5, ""
Cheers,
Karl
AC 28 USA and earlier • macOS Sequoia 15.4, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-01 02:07 PM
2011-04-01
02:07 PM
Karl wrote:The Picture command has a similar description. The Picture 14 has an example, at line 174 is this code:
I couldn't find a lib part in gsm format (production lib) that does this to look at - do you have the name of one?
if gs_picture_custom = 0 then picture 1, a - 2*bIsFrame*gs_frame_width, zzyzx - 2*bIsFrame*gs_frame_width, 1 else if gs_picture_name <> "" then picture gs_picture_name, a - 2*bIsFrame*gs_frame_width, zzyzx - 2*bIsFrame*gs_frame_width, 1 else picture 1, a - 2*bIsFrame*gs_frame_width, zzyzx - 2*bIsFrame*gs_frame_width, 1 endif endifWhich, if I understand it correctly, is calling for Image Index 1 when no custom image is called. This may give you an object to play with to try to sort out how it works.
HTH,
David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-01 02:11 PM
2011-04-01
02:11 PM
There is a Urban house model in depository AFAIK that uses the embedded images (no separate images but the ui does have them inside)
Unfortunately it has locked scripts so will not be usefull as example.
Best Regards,
Piotr
Unfortunately it has locked scripts so will not be usefull as example.
Best Regards,
Piotr
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-02 12:50 AM
2011-04-02
12:50 AM
Peter wrote:As others have said, the image is imbedded in the object and cannot be used by other objects. I used imbedded images in the modular joinery object for some parts of the UI.
If I wanted to use the same image in another object, how would I do it, as the image doesn't seem to be in the macro library?
You can create embedded images by saving the image(s) from ArchiCAD as a GSM. This can be merged into other objects by converting the GSM to XML, pasting the image section into the recipient XML file, and converting back to GSM.
Ralph Wessel BArch
Central Innovation
Central Innovation
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-04 10:19 PM
2011-04-04
10:19 PM
Many thanks for all the info, but I'm still not entirely sure what I need to do to be able to use the image elsewhere!
My reason for asking was that I was trying to recreate the 2d symbol part of the User Interface in another tree object that has no UI. The specific object I was looking at was the "Tree Deciduous 01 14" object, which itself calls the "Fronded_tree_ui_macro-10" macro.
I have successfully got the plan symbol to change correctly, it was just the image in the UI not displaying.
This is the specific section starting on line 238. The picture index is 57 and is meant to show the 40 different tree symbols.
Unfortunately, I have no knowledge of XML or GDL to XML conversion, so is it possible to actually extract the image back out again? I'd appreciate it if someone could do this for me, or would GS be interested in posting the original perhaps? I'd also be interested in knowing why was it embedded in the first place. It seems strange that some images are embedded, and some aren't even within the same object.
(@ Karl) There are several other images referred to by their index in this script as well, if you are looking for examples. I presume it is the same object in the US library?
Thanks for all the interest and help!

My reason for asking was that I was trying to recreate the 2d symbol part of the User Interface in another tree object that has no UI. The specific object I was looking at was the "Tree Deciduous 01 14" object, which itself calls the "Fronded_tree_ui_macro-10" macro.
I have successfully got the plan symbol to change correctly, it was just the image in the UI not displaying.
This is the specific section starting on line 238. The picture index is 57 and is meant to show the 40 different tree symbols.
if bSymbol then ui_outfield `Symbol Type`, 240, 40, 140, rowy ui_infield "type", 240, 60, 200, 200, 1, 57, 40, 8, ! Fronded_tree_symbol 88, 95, 80, 80, 1, "", 2, "", 3, "", 4, "", 5, "", 6, "", 7, "", 8, "", 9, "", 10, "", 11, "", 12, "", 13, "", 14, "", 15, "", 16, "", 17, "", 18, "", 19, "", 20, "", 21, "", 22, "", 23, "", 24, "", 25, "", 26, "", 27, "", 28, "", 29, "", 30, "", 31, "", 32, "", 33, "", 34, "", 35, "", 36, "", 37, "", 38, "", 39, "", 40, "" endif
Unfortunately, I have no knowledge of XML or GDL to XML conversion, so is it possible to actually extract the image back out again? I'd appreciate it if someone could do this for me, or would GS be interested in posting the original perhaps? I'd also be interested in knowing why was it embedded in the first place. It seems strange that some images are embedded, and some aren't even within the same object.
(@ Karl) There are several other images referred to by their index in this script as well, if you are looking for examples. I presume it is the same object in the US library?
Thanks for all the interest and help!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-05 05:30 PM
2011-04-05
05:30 PM
I found the symbol from the AC 11 library als jpg; is this the same?
Fronded_tree_symbol_11.jpg
p.s. extracting with XML Converter is not possible (as fa as I know)
Fronded_tree_symbol_11.jpg
p.s. extracting with XML Converter is not possible (as fa as I know)
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-04-05 06:09 PM
2011-04-05
06:09 PM
Joachim wrote:Well done! That looks like the one.
I found the symbol from the AC 11 library als jpg; is this the same?
Fronded_tree_symbol_11.jpg
p.s. extracting with XML Converter is not possible (as fa as I know)

Many thanks for taking the time to find it. I might get this object finished sometime before 2012 now!
