Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter Dynamic Array Question.

Hai SAGI-VIZ
Newcomer
Hi everyone,
I need to create a dynamic array for angle parameters to assign to Graphical Editing Hotspot.
As attachment image, I created an array for number of the rebars I need but when I moved hotspot, all of them is moved because I do not know how to create a dynamic array for "angle_2" parameter. I want to move each of the rebar separately.
Please show me how to do it and write onto which script window for dynamic array parameters.

P/S: When I can move each of rebar separately, then I want to know distance between selectd rebar's hotspot to both of next rebars for confirm. I thought can calculate the distance of to [i-1] and [i+1] elements. Then I will show them as displayParam in Graphical Editing Hotspot.
	angle=0
	for i=1 to iRebar_num-1
		angle=i*360/iRebar_num
		rot2 angle
			hotspot2 0, 0, unID, angle_2, 6 : unID=unID+1
			hotspot2 mRebarDis,0,unID,angle_2,4+128 : unID=unID+1
			hotspot2 (mRebarDis*cos(angle_2)),(mRebarDis*sin(angle_2)),unID,angle_2,5 : unID=unID+1
				add2	(mRebarDis*cos(angle_2)),(mRebarDis*sin(angle_2))
					poly2_b	2, 1+2+4+64, gs_fill_pen, gs_back_pen,
							0, 0, 901,
							rKei/2, 360, 4001
		del 2
	next i
Best regards,
Thanks so much.
1 ACCEPTED SOLUTION

Solution
runxel
Mentor
Hey there 🙂

Try this one.
Basically the idea is to store the rotation offset from the current point into an array.
Good luck!
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

3 REPLIES 3

Solution
runxel
Mentor
Hey there 🙂

Try this one.
Basically the idea is to store the rotation offset from the current point into an array.
Good luck!
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

Hai SAGI-VIZ
Newcomer
Hi Runxel,

I knew you as GDL-Sublime's developer, it is great idea and amazing tool.

P/S: Private question, do you know or can make an ArchiCAD API Add-on?

Thank you so much.
Best regards,

Hai SAGI-VIZ
Newcomer
runxel wrote:
Hey there

Try this one.
Basically the idea is to store the rotation offset from the current point into an array.
Good luck!
Thank Lucas so much.
It worked well and this is exactly what I want to learn. Detailed explaining from Pro with kind. I am very happy to learn something from you about GDL or API (if you doing).
I am trying to learn how to write GDL more easier from GDL-Sublime of yours via XML workflow.

Thank again.
Best regards.
HAI

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!