Range values into arrays
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-09-10 10:27 AM
2004-09-10
10:27 AM
(for eg. with graphical hotspots, possibility to increase each angle value by step 10 degrees, or custom)
I can do it for a single object, but unfortunately, not into an array.
According to the manual, it seems difficult, because no variable are allowed.
I am not sure to interpretate this correctly, so i hope there is perhaps a workaround.
Any info appreciated.
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-09-15 07:13 PM
2004-09-15
07:13 PM
I tried it and it seem to work:
Define a parameter "q" array in the Parameters list.
Then write in the Parameter Script something like this:
VALUES "q" 1,2,3,RANGE(5,7)
If you want to change each array parameter you have to make an Interface Script, where you write something like this:
UI_DIALOG ""
UI_INFIELD{2} q[1], 10,10,80,20
UI_INFIELD{2} q[2], 10,30,80,20
UI_INFIELD{2} q[3], 10,50,80,20
UI_INFIELD{2} q[4], 10,70,80,20
Define a parameter "q" array in the Parameters list.
Then write in the Parameter Script something like this:
VALUES "q" 1,2,3,RANGE(5,7)
If you want to change each array parameter you have to make an Interface Script, where you write something like this:
UI_DIALOG ""
UI_INFIELD{2} q[1], 10,10,80,20
UI_INFIELD{2} q[2], 10,30,80,20
UI_INFIELD{2} q[3], 10,50,80,20
UI_INFIELD{2} q[4], 10,70,80,20
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-09-15 08:49 PM
2004-09-15
08:49 PM
Thanks for answering, Joachim.
I will try your solution tomorrow, and tell you.
Thanks again.
I will try your solution tomorrow, and tell you.
Thanks again.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-09-23 09:14 AM
2004-09-23
09:14 AM
There seems to be a bug in ArchiCAD:
To use movable hotspots together with the VALUES command and RANGE is no problem.
But if you use movable hotspots together with the VALUES command and RANGE and you use Array parameters within the VALUES command the VALUES command will have no function while moving your hotspots in 2D or 3D.
An example:
Define an array parameter named "angle" with 2 rows (angle[2]),
write in the Parameter Script:
VALUES "angle" RANGE [0, 360] STEP 360, 10
this does not work if you use movable hotspots,
you have to do a workaround instead:
FOR i=1 TO 2
FOR k=0 TO 35 STEP 1
IF angle>10*k+5 AND angle<=10*(k+2)-5 THEN angle=10*(k+1)
PARAMETERS angle=angle
NEXT k
NEXT i
The 2D Script with the editable hotspots look like this (from the gdl manual):
LINE2 0, 0, A, 0
LINE2 0, 0, A*COS(angle[1]), A*SIN(angle[1])
ARC2 0, 0, 0.90*A, 0, angle[1]
ARC2 0, 0, 0.60*A, 0, angle[2]
unID=1
HOTSPOT2 0, 0, unID : unID=unID+1 ! anchor point
HOTSPOT2 0 , 0 , unID, angle[1], 6 : unID=unID+1
HOTSPOT2 0.9*A , 0 , unID, angle[1], 4 : unID=unID+1
HOTSPOT2 0.9*A*COS(angle[1]), 0.9*A*SIN(angle[1]), unID, angle[1], 5 : unID=unID+1
HOTSPOT2 0 , 0 , unID, angle[2], 6 : unID=unID+1
HOTSPOT2 0.6*A , 0 , unID, angle[2], 4 : unID=unID+1
HOTSPOT2 0.6*A*COS(angle[2]), 0.6*A*SIN(angle[2]), unID, angle[2], 5 : unID=unID+1
Has anyone another solution?
Graphisoft, please put this into your bug list!
To use movable hotspots together with the VALUES command and RANGE is no problem.
But if you use movable hotspots together with the VALUES command and RANGE and you use Array parameters within the VALUES command the VALUES command will have no function while moving your hotspots in 2D or 3D.
An example:
Define an array parameter named "angle" with 2 rows (angle[2]),
write in the Parameter Script:
VALUES "angle" RANGE [0, 360] STEP 360, 10
this does not work if you use movable hotspots,
you have to do a workaround instead:
FOR i=1 TO 2
FOR k=0 TO 35 STEP 1
IF angle
PARAMETERS angle
NEXT k
NEXT i
The 2D Script with the editable hotspots look like this (from the gdl manual):
LINE2 0, 0, A, 0
LINE2 0, 0, A*COS(angle[1]), A*SIN(angle[1])
ARC2 0, 0, 0.90*A, 0, angle[1]
ARC2 0, 0, 0.60*A, 0, angle[2]
unID=1
HOTSPOT2 0, 0, unID : unID=unID+1 ! anchor point
HOTSPOT2 0 , 0 , unID, angle[1], 6 : unID=unID+1
HOTSPOT2 0.9*A , 0 , unID, angle[1], 4 : unID=unID+1
HOTSPOT2 0.9*A*COS(angle[1]), 0.9*A*SIN(angle[1]), unID, angle[1], 5 : unID=unID+1
HOTSPOT2 0 , 0 , unID, angle[2], 6 : unID=unID+1
HOTSPOT2 0.6*A , 0 , unID, angle[2], 4 : unID=unID+1
HOTSPOT2 0.6*A*COS(angle[2]), 0.6*A*SIN(angle[2]), unID, angle[2], 5 : unID=unID+1
Has anyone another solution?
Graphisoft, please put this into your bug list!
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-09-23 03:50 PM
2004-09-23
03:50 PM
Thanks for the help and the private exchanges, Joachim, the workaround is great.
It would be easier to use directly value command with range definition into arrays,
because the ability to use also a custom value if needed.
GS, please, is there an issue to fix it?
It would be easier to use directly value command with range definition into arrays,
because the ability to use also a custom value if needed.
GS, please, is there an issue to fix it?