We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2013-09-21 03:36 AM - last edited on 2024-09-26 01:46 PM by Doreena Deng
2023-11-13 02:19 PM
Thanks! Very usefull. Is it also possible to add a fill?
I am trying to make an object using 3 different transparant fills on top of each other.
2023-11-13 02:33 PM
You can add a fill by copying the snippet below to the object's 2D code section.
fill 2 ! or whatever you want
for i = 1 to points
put xx[i], yy[i]
next i
poly2 nsp/2, 1+2+4, get(nsp)
2023-11-13 03:21 PM
Thanks a lot! Just what I needed. Works perfect!
2023-11-13 06:20 PM
2023-11-14 02:58 AM
Try something like ...
for i = 1 to points
put xx[i], yy[i], s[i]
next i
poly2_B nsp/3, 1+2+4,
fill_pen, fill_background_pen,
get(nsp)
You have to add the status code to your PUT statements.
,s[i] could probably just be replaced with ,1 if you want all the edges visible.
Change the number of nodes to allow for the fact you are PUTing 3 values now.
Adjust the POLY command.
Barry.
2023-11-14 09:11 AM
Thanks Barry!
The script works but i get a remark when I try to set the values of the s[i] to the same value
"Possibly unwanted parameter type change
at line 52 in the 2D script"
2023-11-14 09:24 AM
If it is always going to be '1' then I would try ...
for i = 1 to points
put xx[i], yy[i], 1
next i
And not worry about setting the array values for s[i]
Barry.
2023-11-14 09:31 AM - edited 2023-11-14 09:31 AM
In fact I added a fill to a polyline object just a little while ago.
Barry.