GDL
About building parametric objects with GDL.

unable to hide hotspots in object

Anonymous
Not applicable
Hello,
I made an object with hotspots (with "hotspot placement tool"), these hotspots are placed in the layer of "drafting-hotspot",
but when I hide this layer of "drafting-hotspot", these hostpots are still visible,
how to hide them?

Regards
6 REPLIES 6
Karl Ottenstein
Moderator
Please give a little more detail on what you're doing. You say that you made "an object" ... do you mean that you created, by script or by saving, a GDL Object? If so, the entire object exists in only the one layer that you use to place it into your project. Hotspots or other sub-elements do not have any associated layer. If you want to hide part of a GDL object - you must create a parameter (or use a global) and then use that parameter to drive the logic to generate or not generate the desired parts of the object (hotspots in this case).
One of the forum moderators
AC 28 USA and earlier   •   macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Hello Karl
I :
(1) made a morpoh
(2) then add hotspots with "hotspot placement tool" and set to layer "2D Drafting"
(3) the save selection of morph and hotspot as a library part
(4) then insert this objects to model

then after hide the layer "2D Drafting", the hotspots are still visible

Thanks
Barry Kelly
Moderator
As Karl said, once you save it as an object, it no longer has separate layers.
It becomes one single object and is placed in the layer of your choice.

The only way to hide the hotspots permanently would be to turn them off before you save as an object.

Otherwise you will need to edit the GDL script and add a boolean switch parameter to allow you to turn the hotspots on or off in the object settings - you will need to know a little GDL coding to do this.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Hello Barry,
Could you give this code? I know a little bit about GDL

Thanks
Barry Kelly
Moderator
Create a boolean parameter called ... show_hotspot_3d

Then in the 3D script you will see the HOTSPOT commands.

You need to contain those HOTSPOTs in an IF/THEN command.

i.e. in the 3D script to hide 3D hotspots...
IF show_hotspot_3d = 1 THEN
      HOTSPOT.....
      HOTSPOT.....
      HOTSPOT.....
ENDIF

You can do similar for 2D hotspots in the 2D script, create another boolean parameter ... show_hotspot_2d ...
IF show_hotspot_2d = 1 THEN
      HOTSPOT2.....
      HOTSPOT2.....
      HOTSPOT2.....
ENDIF

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
OK Thanks Barry