We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Editable 2D Hotspots

Anonymous
Not applicable
Hi All,

I am new to GDL scripting and I'm sure my issue will be easily fixed, but for the life of me I have no idea where to look.

In my object I have parameters that control the front, rear, and side overhangs of the benchtop, these overhang parameters are integers. I wish for these to be controllable by the use of hotspots in 2d.

For the most part I am able to get the 'hotspot2' command to work, the part that is leaving me scratching my head is when stretching the object in 2D, instead of giving me a width in 'millimeters' it snaps to every meter. This means if I want to show a 50mm overhang, I am forced to stretch the node 50m. The 2D model then shows correctly with a 50mm overhang.

Does anyone have any idea what I have missed?

I am happy to post more information if required,

Thanks

- Jason
3 REPLIES 3
Bruce
Advisor
Without seeing your code, it's hard to be sure: but one possible reason is because the code will use meters as its dimensions, even if your project & parameters use millimeters.

Change the decimal place in your code to be for meters, and it could be what's causing the issue (e.g. instead of 50, use 0.05).
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb
Anonymous
Not applicable
I have attached the object for your review, please take a look and let me know if there is a way to display millimeters instead of meters. I feel it will create a cleaner finish if all parameters use one unit of measurement.

Do keep in mind that I have no prior coding experience and started using GDL 2 weeks ago, so I apologise if my code is incoherent. If you have the time please feel free to provide feedback on any of the elements I have created, if there is a better, or more efficient procedure to use.

- Jason
Bruce
Advisor
A quick look tells me you should get rid of the MUL 0.001 commands you have in your 2D & 3D scripts, along with then multiplying everything by 1000 (which essentially amounts to "variable/1000*1000").

Trying to apply a multiplication to parameters in dynamic HOTSPOT commands is what is causing the issue, I think.
Bruce Walker
Barking Dog BIM YouTube
Mindmeister Mindmap
-- since v8.1 --
AC27 5060 INT Full | Windows 11 64 Pro | 12th Gen Intel i7-12700H 2.30 GHz | 64 Gb RAM | NVIDIA GeForce RTX 3060 32 Gb