I have some weird problem with a dynamic hotspot. I'm on AC 21 3005 but I replicated it in AC 24 7006 too. It's not a really important bug but I cannot understand what is happening 😅
So let's say I have an object with two extrusions, in the main script or 3D script, I have two heights tied to ZZYZX (I guess that's where the bug is coming from) :
HT1 = ZZYZX HT2 = ZZYZX+0.200
In the 3D script
hs = 001 HOTSPOT 0, 0, -1, hs, ZZYZX, 3 : hs = hs + 1 HOTSPOT 0, 0, 0, hs, ZZYZX, 1 : hs = hs + 1 HOTSPOT 0, 0, ZZYZX, hs, ZZYZX, 2, ZZYZX, "" : hs = hs + 1 ! Purple hotspot BLOCK A, B, HT1 ADDx A HOTSPOT 0, 0, HT2, hs : hs = hs + 1 ! Second hotspot BLOCK A, B, HT2 DEL 1
So if I move the purple hotspot with the "move node" button of the pet palette, everything is ok. If I do so with the "stretch height" button, the height is changed but it's the bottom that stretches rather than the top which makes the stretching wrong.
This only happens if HT2 > H1 or if there is only the purple hotspot. I mean, if HT2 > HT1 then it happens only if I create a second hotspot at HT2 but if I create that second hotspot, then the bug doesn't appear if H2 <= H1.
Anybody knows why ?
@MetalFingerz based on your variable settings HT2 should never be greater than HT1 and iirc Block dimensions should never be <= 0
Try changing your Block dimensions to reference the parameter ZZYZX rather than the variables e.g. BLOCK A, B, ZZYZX - 0.200
Your problems are probably related to the way you are storing & updating the HT variables.
I had tried this but it didn't solve the issue unfortunately.
I was mostly wondering about the difference between the "move node/vertex" and the "stretch/change height" functions of the pet palette and why they behave differently in this case. It seems that if I chose to move the vertex, the absolute value of the parameter is changed (ie the new value is 1.5m). However if I chose the height stretch, the value is changed relatively (ie : -0.5m to go from 2m to 1.5m)
Anyway, I "solved" the issue by not having a second hotspot because it was not necessary.
In that case standard Archicad object Cube also has this bug ) - if you choose icon height-change, though icon move vertice works fine
I think that's just AC logic - after object is placed any height changes make taller or smaller based on its bottom. Unless you make some conditions in parameter script - if I am not mistaken I saw Piotr Dobrowolski object of sewer manhole where its top (cover) was its base and you could stretch it down
Hi, ZZYZX should be the full height of the object, you need another parameter to correctly edit the height of the smaller part. In the parameter script you can calculate ZZYZX from the edited height, or vice versa, using GLOB_MODPAR_NAME as a condition.