We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
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?
2011-04-01 04:04 AM
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, ""
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.
2011-04-01 02:11 PM
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?
2011-04-04 10:19 PM
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
2011-04-05 05:30 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)