<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Images in Objects user interface. in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198705#M18233</link>
    <description>&lt;BLOCKQUOTE&gt;Joachim wrote:&lt;BR /&gt;I found the symbol from the AC 11 library als jpg; is this the same?&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://gdl.b-prisma.de/Fronded_tree_symbol_11.jpg" target="_blank"&gt;Fronded_tree_symbol_11.jpg&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
p.s. extracting with XML Converter is not possible (as fa as I know)&lt;/BLOCKQUOTE&gt;

Well done! That looks like the one. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
Many thanks for taking the time to find it. I might get this object finished sometime before 2012 now! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;</description>
    <pubDate>Tue, 05 Apr 2011 16:09:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-04-05T16:09:30Z</dc:date>
    <item>
      <title>Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198698#M18226</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I know I'm going to regret asking this, but I notice that in some object's user interface code (e.g. "Fronded_tree_ui_macro-10" - the UI for the tree objects), the image name is referred to by an index number. The numbers 50 &amp;amp; 51 in this example -&lt;BR /&gt;

&lt;PRE&gt;	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
	endif&lt;/PRE&gt;

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?&lt;BR /&gt;
&lt;BR /&gt;
Many thanks!&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Apr 2011 00:46:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198698#M18226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-01T00:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198699#M18227</link>
      <description>Hi Peter,&lt;BR /&gt;
&lt;BR /&gt;
I'd never noticed this.  Manual says the index refers to an image embedded within the library part itself - not in the loaded lib.&lt;BR /&gt;
&lt;BR /&gt;
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?&lt;BR /&gt;
&lt;BR /&gt;
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?&lt;BR /&gt;
&lt;BR /&gt;
Here's the small bit of documentation I found:&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;The XML source of a library part may contain the following reference (you have to change the filename, mime type and the SubIdent fields) :&lt;BR /&gt;
&lt;BR /&gt;
&amp;lt;GDLPict MIME="image/png" path="foldername/filename.png" SubIdent="3" platform="Win" SectVersion="19" SectionFlags="0"&amp;gt;&lt;BR /&gt;
&amp;lt;/GDLPict&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
You can create a reference to this image via the SubIdent (here it is 3) in the GDL script :&lt;BR /&gt;
&lt;BR /&gt;
UI_INFIELD "parName", 0, 5, 302, 54,&lt;BR /&gt;
1, 3, 5, 1,			! a "3"&lt;BR /&gt;
56, 50, 40, 40,&lt;BR /&gt;
1, "",&lt;BR /&gt;
2, "",&lt;BR /&gt;
3, "",&lt;BR /&gt;
4, "",&lt;BR /&gt;
5, ""&lt;/BLOCKQUOTE&gt;

In one XML sample part, I found a bunch of &amp;lt;GDLPict&amp;gt; definitions, and corresponding UI_Pict uses, referring to the same index/SubIdent numbers.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Karl</description>
      <pubDate>Fri, 01 Apr 2011 02:04:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198699#M18227</guid>
      <dc:creator>Karl Ottenstein</dc:creator>
      <dc:date>2011-04-01T02:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198700#M18228</link>
      <description>&lt;BLOCKQUOTE&gt;Karl wrote:&lt;BR /&gt;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?&lt;/BLOCKQUOTE&gt;

The &lt;FONT color="blue"&gt;Picture&lt;/FONT&gt; command has a similar description. The &lt;FONT color="blue"&gt;Picture 14&lt;/FONT&gt; has an example, at line 174 is this code:
&lt;PRE&gt;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 &amp;lt;&amp;gt; "" 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
endif&lt;/PRE&gt;
Which, 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.&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Fri, 01 Apr 2011 12:07:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198700#M18228</guid>
      <dc:creator>David Maudlin</dc:creator>
      <dc:date>2011-04-01T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198701#M18229</link>
      <description>There is a Urban house model in depository AFAIK that uses the embedded images (no separate images but the ui does have them inside) &lt;BR /&gt;
Unfortunately it has locked scripts so will not be usefull as example.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;BR /&gt;
Piotr</description>
      <pubDate>Fri, 01 Apr 2011 12:11:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198701#M18229</guid>
      <dc:creator>Piotr Dobrowolski</dc:creator>
      <dc:date>2011-04-01T12:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198702#M18230</link>
      <description>&lt;BLOCKQUOTE&gt;Peter wrote:&lt;BR /&gt;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?&lt;/BLOCKQUOTE&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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.</description>
      <pubDate>Fri, 01 Apr 2011 22:50:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198702#M18230</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-04-01T22:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198703#M18231</link>
      <description>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! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt; &lt;BR /&gt;
  &lt;BR /&gt;
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.  &lt;BR /&gt;
  &lt;BR /&gt;
I have successfully got the plan symbol to change correctly, it was just the image in the UI not displaying.  &lt;BR /&gt;
  &lt;BR /&gt;
This is the specific section starting on line 238. The picture index is 57 and is meant to show the 40 different tree symbols.  
&lt;PRE&gt;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  
&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
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. &lt;BR /&gt;
 &lt;BR /&gt;
(@ 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? &lt;BR /&gt;
 &lt;BR /&gt;
Thanks for all the interest and help!</description>
      <pubDate>Mon, 04 Apr 2011 20:19:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198703#M18231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-04T20:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198704#M18232</link>
      <description>I found the symbol from the AC 11 library als jpg; is this the same?&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://gdl.b-prisma.de/Fronded_tree_symbol_11.jpg" target="_blank"&gt;Fronded_tree_symbol_11.jpg&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
p.s. extracting with XML Converter is not possible (as fa as I know)</description>
      <pubDate>Tue, 05 Apr 2011 15:30:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198704#M18232</guid>
      <dc:creator>Jochen Suehlo</dc:creator>
      <dc:date>2011-04-05T15:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Images in Objects user interface.</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198705#M18233</link>
      <description>&lt;BLOCKQUOTE&gt;Joachim wrote:&lt;BR /&gt;I found the symbol from the AC 11 library als jpg; is this the same?&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://gdl.b-prisma.de/Fronded_tree_symbol_11.jpg" target="_blank"&gt;Fronded_tree_symbol_11.jpg&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
p.s. extracting with XML Converter is not possible (as fa as I know)&lt;/BLOCKQUOTE&gt;

Well done! That looks like the one. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt; &lt;BR /&gt;
&lt;BR /&gt;
Many thanks for taking the time to find it. I might get this object finished sometime before 2012 now! &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 05 Apr 2011 16:09:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Images-in-Objects-user-interface/m-p/198705#M18233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-05T16:09:30Z</dc:date>
    </item>
  </channel>
</rss>

