ā2010-06-14 08:57 AM
if (scaleValues=1) then !Scale with plan Text2 0,1, "Scale with plan" Parameters LastScale=0 LastScale=0 endif if (scaleValues=0) then !Scale independent Text2 0,1,LastScale if ABS(LastScale-GLOB_SCALE)>0 then parameters LastScale=GLOB_SCALE LastScale=GLOB_SCALE endif Text2 0,2,LastScale EndifThank you!
ā2010-06-14 10:58 AM
Beart wrote:Yes, that's no problem. I haven't tested your code snippet, but it looks OK. Just make sure it is part of the Parameter script. The
Hi! How update parameters programmatically? Is it possible?
ā2010-06-14 04:17 PM
Ralph wrote:But it does not workā¦Can you tell me correct code when object rescaling(Scale independent)?
Yes, that's no problem. I haven't tested your code snippet, but it looks OK....
ā2010-06-14 05:43 PM
Beart wrote:I'm not sure what you're aiming to do, but all you need is something like this:
But it does not workā¦Can you tell me correct code when object rescaling(Scale independent)?
if (scaleValues) then !Scale with plan mul2 GLOB_SCALE, GLOB_SCALE endif rect2 0, 0, a, b if (scaleValues) then del 1 endifThe above code draws a box either to the literal object width/depth, or optionally multiplies it by the current scale remains the specified size on the printed sheet.
ā2010-06-15 08:51 AM
ā2010-06-15 04:14 PM
Beart wrote:You don't need this. ArchiCAD will automatically run the object's 2D script whenever the scale changes.
I need a Request, (operator, macros-maybe) for "auto-update" the parameters.
ā2010-06-15 06:25 PM
!============================= ! Parameters A=1000 B=1000 tx=1000 (length) ty=1000 (length) !=============================== !Parameter Script values "ty" range (0,] values "B" ty, -ty values "A" range (0,], range [,0) values "tx" range (0,] !=================================== !2d Script unID=1 hotspot2 0, 0, unID, A, 1+128, A: unID=unID+1 hotspot2 1, 0, unID, A, 3+128, A: unID=unID+1 hotspot2 -A, 0, unID, A, 2, A: unID=unID+1 hotspot2 0,B if symb_rotangle>89.999 and symb_rotangle<269.999 then rot2 180 hotspot2 0, -ty, unID, tx, 1+128 : unID=unID+1 hotspot2 -tx+unit0, -ty, unID, tx, 2 : unID=unID+1 hotspot2 1, ty, unID, tx, 3 : unID=unID+1 hotspot2 -tx+unit0, 0, unID, ty, 1+128 : unID=unID+1 hotspot2 -tx+unit0, -ty, unID, ty, 2 : unID=unID+1 hotspot2 tx+unit0, 1, unID, ty, 3 : unID=unID+1 else hotspot2 0, ty, unID, tx, 1+128 : unID=unID+1 hotspot2 tx, ty, unID, tx, 2 : unID=unID+1 hotspot2 -1, ty, unID, tx, 3 : unID=unID+1 hotspot2 tx, 0, unID, ty, 1+128 : unID=unID+1 hotspot2 tx, ty, unID, ty, 2 : unID=unID+1 hotspot2 tx, -1, unID, ty, 3 : unID=unID+1 endif del top line2 0,ty,tx,ty line2 0,0,0,ty line2 0,0,-A,0 line2 -A,0,tx,ty
ā2010-06-15 06:54 PM
Beart wrote:Before going any further, can you explain what you are trying to accomplish, i.e. what should this object do and how does it interact with the user?
OK. Ralph. Look at this object "Bow" and Scale it independent (Paper Size), please.
ā2010-06-16 02:04 PM
ā2010-06-20 02:21 PM
Beart wrote:OK, I think you are trying to make an object that is based on a fixed size (on the printed page), but can be stretched on screen (using the active units/scale).Ralph wrote:Look at animated gif-pictures.
Before going any further, can you explain what you are trying to accomplish, i.e. what should this object do and how does it interact with the user?