We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2017-05-24 04:43 PM
2017-05-24 05:16 PM
2017-05-24 05:18 PM
matjashka wrote:track_length/2 is on the end point of my object, as I said, 0, 0 is in the centre of the object. I have no issues with the height or depth but I cannot solve the width.
JGoode,
The problem with your code is that you are placing your hotstpot attrack_length/2but trying to modify track_lengthparameter.
Make sure that the position of the hotspot actually corresponds with the dimension you're editing.
2017-05-24 07:47 PM
hotspot2 0, 0, 1001, half, 1 hotspot2 half, 0, 1002, half, 2 hotspot2 -1, 0, 1003, half, 3 A=half*2 ![edit] you don't really need this line, see below line2 -A/2, 0, A/2, 0 hotspot2 -A/2, 0Now, this sample script defines length of line by its half length. To get the overall length updated in the dialog box you may use the following Parameter script:
parameters A=half*2 lock "A"Now, say you want to alternate between being able to define the length BOTH by "A" and "half", I suggest you program a switch, make your calculations conditional (IF... THEN), and let the user choose. ArchiCAD will not let you alternate between them in a continuous loop.
2017-05-24 08:00 PM