BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.
SOLVED!

Question about hiding hotspots

Nader Belal
Mentor
Hi there,

I have an object with many graphical editing hotspots. And I have programmed a condition that in case it is met those hotspots becomes inactivated, in favour to static hotspots.

Is there is a way that can be implemented for not repeating the script for hotspots ??

Thank you in advence
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Nader Belal
Mentor
I think that I have just found it.

It must all controlled in the Parameters Script.

lets say that you have a parameter that is connected to a graphical hotspot with predefined values:
values "length", range [1, 10]

And there must be a condition that its absence must lock those values, to prevent editing ... the normal procedure would by hiding the parameters and mark those hotspot as hidden, and may be writing new hotspots to subtitute the old graphical editing one. BAD MOVE

Because:
  • Associated dimensions will be lost as the graphical hotspot have turned as hidden.
  • The object's script will be bloated, 2D and 2D Script.
  • Even if the new non-graphical editing hotspot would have the same identification number as those of their graphical editing one, they could be treated as new entities (that statement may need correction).
A better way is to lock the parameters' values in the Parameters Script (a mixture of pseudo-code and GDL).
if (condition is not met) then
	values "length", range [1, 10]
else
	values "length", length
endif
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

View solution in original post

5 REPLIES 5
Barry Kelly
Moderator
I am not quite sure what you are after.

If you want graphical hotspots but in certain circumstances they are to be just plain hotspots then you will need to script both.
Then use an IF/THEN statements to control which hotspots you see.

If you are careful and each matching hotspot has the same ID number, you should find you can dimension your object to the hotspot and the dimension will remain when they change.
If the hotspot ID changes and you have dimensioned it - the dimension will disappear with the hotspot.

i.e. the HSID = HSID+1 routine you see between hotspots can be a bad thing if you are turning hotspots on and off and you want to dimension them.
They need a static ID that remains the same all the time.

I might be going a bit off topic there sorry, but it is important if you need to dimension your objects.


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Nader Belal
Mentor
I have a spaghetti of conditions and variable that controls the a parametric object. And right now, the graphical hotspots are occupying the biggest portion on the script for that issue exactly "Dimentioning".

I tried to hide them, but is like turning them off.

I also tried to create the non graphical editing hotspots with the same ID, but under my circumstances, it's simply no use, since I have a lot of nested routines that generates them.
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Nader Belal
Mentor
@Barry

I just thought in this idea, since that graphical editing hotspots are linked to parameter, so if locked there values when a condition is met, then there is no need to repeat scripting those hotspot !!!

Is it posible to lock the parameter's values in the Parameter script if a condition is met ??
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Solution
Nader Belal
Mentor
I think that I have just found it.

It must all controlled in the Parameters Script.

lets say that you have a parameter that is connected to a graphical hotspot with predefined values:
values "length", range [1, 10]

And there must be a condition that its absence must lock those values, to prevent editing ... the normal procedure would by hiding the parameters and mark those hotspot as hidden, and may be writing new hotspots to subtitute the old graphical editing one. BAD MOVE

Because:
  • Associated dimensions will be lost as the graphical hotspot have turned as hidden.
  • The object's script will be bloated, 2D and 2D Script.
  • Even if the new non-graphical editing hotspot would have the same identification number as those of their graphical editing one, they could be treated as new entities (that statement may need correction).
A better way is to lock the parameters' values in the Parameters Script (a mixture of pseudo-code and GDL).
if (condition is not met) then
	values "length", range [1, 10]
else
	values "length", length
endif
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Nader Belal
Mentor
Update,

This method my pause problems with Array parameters
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Learn and get certified!