We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-06-07 12:15 PM
Does anybody knows is it possible to combine object stretching "ways" when object's origin located at center, not on the edge?
1. HS align to any element that already is placed. To do so additional parameter and IF statement in Parameter script was added.
2. Drag HS and manually enter value.
It seems like each path exclude other. Ideally 2nd one would work, but unfortunately HS can't be align properly to others element.
Solved! Go to Solution.
2023-06-08 04:26 AM - edited 2023-06-08 04:43 AM
You need to use a intermediate parameter which is half of your overall width. You then associate your hotspots to this parameter.
IF GLOB_MODPAR_NAME = "B" then
A = 2 * B
PARAMETERS A = A
endIF
IF GLOB_MODPAR_NAME = "A" then
B = A/2
PARAMETERS B = B
endIF
HOTSPOT2 0, 0, unID, B, 1 : unID = unID + 1
HOTSPOT2 -A/2, 0, unID, B, 2, A : unID = unID + 1
HOTSPOT2 A, 0, unID, B, 3 : unID = unID + 1
HOTSPOT2 0, 0, unID, B, 1 : unID = unID + 1
HOTSPOT2 A/2, 0, unID, B, 2, A : unID = unID + 1
HOTSPOT2 -A/2, 0, unID, B, 3 : unID = unID + 1
LINE2 -A/2, 0, A/2, 0
Ling.
ps. Did not see object.
pss. Ah, you have basically done the same thing. You just need another GLOB_MODPAR_NAME for when you edit Length. THOUGH, I do not think you should be defining your hotspot positions using your intermediate parameter as that may cause issues down the line if you have other variables that modifiy Length as those actions will not proc GLOB_MODPAR_NAME given they are not direct intervention.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-06-08 04:26 AM - edited 2023-06-08 04:43 AM
You need to use a intermediate parameter which is half of your overall width. You then associate your hotspots to this parameter.
IF GLOB_MODPAR_NAME = "B" then
A = 2 * B
PARAMETERS A = A
endIF
IF GLOB_MODPAR_NAME = "A" then
B = A/2
PARAMETERS B = B
endIF
HOTSPOT2 0, 0, unID, B, 1 : unID = unID + 1
HOTSPOT2 -A/2, 0, unID, B, 2, A : unID = unID + 1
HOTSPOT2 A, 0, unID, B, 3 : unID = unID + 1
HOTSPOT2 0, 0, unID, B, 1 : unID = unID + 1
HOTSPOT2 A/2, 0, unID, B, 2, A : unID = unID + 1
HOTSPOT2 -A/2, 0, unID, B, 3 : unID = unID + 1
LINE2 -A/2, 0, A/2, 0
Ling.
ps. Did not see object.
pss. Ah, you have basically done the same thing. You just need another GLOB_MODPAR_NAME for when you edit Length. THOUGH, I do not think you should be defining your hotspot positions using your intermediate parameter as that may cause issues down the line if you have other variables that modifiy Length as those actions will not proc GLOB_MODPAR_NAME given they are not direct intervention.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-06-08 08:02 AM
Thanks
Good point, it was not wise to use intermediate parameter for defying HS position.
TBH I haven't wrote another condition (for changing intermediate parameter if original is changed), because i thought that would alter HS position, but not object length when entering distance value manually