Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.
SOLVED!

Picture2 Display Order

JGoode
Expert
Hello,

I'm trying to add a picture in 2D but it defaults to be behind my fill - I have tried using DRAWINDEX but that doesn't seem to work either. Is there just no way of bringing a picture in front of a fill?

Here's my code for reference:
DRAWINDEX 10

add2 symb_pos_x, symb_pos_y
ROT2 symb_rot
if dis_symbol then
	if (type = t1) then ! Outlet
		if (sign_type = st1) then !dry
			picture2 "dry_riser_outlet", symb_height, symb_height, 1
		else
			picture2 "wet_riser_outlet", symb_height, symb_height, 1
		endif
	else
		if (sign_type = st1) then !dry
			picture2 "dry_riser_inlet", symb_height, symb_height, 1
		else
			picture2 "wet_riser_inlet", symb_height, symb_height, 1
		endif
	endif
endif

DEL 2

DRAWINDEX 30

pen gs_fill_pen
project2{3} 3, 270, 3 + 32, 4, gs_back_pen  ! adds fill

pen gs_cont_pen
project2 3, 270, 2 !adds outline
ArchiCAD 23

Windows 10
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator
I can’t test your script at the moment, but just looking at it you need DRAWINDEX 30 for the picture then DRAWINDEX 10 for the fill.

Or try scripting the fill first and then the picture (I am not sure if that will change anything but try anyway).

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

3 REPLIES 3
Solution
Barry Kelly
Moderator
I can’t test your script at the moment, but just looking at it you need DRAWINDEX 30 for the picture then DRAWINDEX 10 for the fill.

Or try scripting the fill first and then the picture (I am not sure if that will change anything but try anyway).

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
And looking at the script again you are not adding a fill.
You are using PROJECT2, so maybe that is the problem and it can’t go behind - I have never tested this.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
JGoode
Expert
Thanks for your help Barry, I must have misread the gdl guidance.

Just to confirm - it doesn't work with the PROJECT2.
ArchiCAD 23

Windows 10