Dangers of using GLOB_​​FEEDBACK_​​MODE in Parameter Script

Home Forums Problems and solutions in GDL Parameter connections Dangers of using GLOB_​FEEDBACK_​MODE in Parameter Script

Viewing 4 reply threads
  • Author
    Posts
    • #4103
      Denny Wong
      Participant

      Hi,

      Just want to get some clarity in what danger it is to use GLOB_FEEDBACK_MODE in Parameter Script.

      I am not hoping to store the value of the variable, (i.e. parameters something=GLOB_FEEDBACK_MODE) but rather its for holding back parameter checking until hotspot editing is done. (i.e. if GLOB_FEEDBACK_MODE then : !NO CHECKING : else : !PERFORM CHECKS : endif)

      Is there any danger or future compatibility issue with this?

      Many thanks in advance.

      Bond Bryan Architects, Westerham, UK

    • #4104
      Denny Wong
      Participant

      Ok I learnt it the hard way how weird things can become when using GLOB_FEEDBACK_MODE in master script… I found a work around it anyway but it seems like there is some sort of caching of movable hotspots?? I am very confused…

      Bond Bryan Architects, Westerham, UK

    • #4105
      Barry Kelly
      Participant

      GLOB_FEEDBACK_MODE is view dependent, so it shouldn’t be used in the parameter script – this includes the master script when it runs as the parameter script (which it will do).
      You would probably be better off using it just in the 2D and/or 3D scripts.

      Barry.

      Versions 6.5 to 22
      Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
      Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    • #4106
      Denny Wong
      Participant

      Thanks Barry, I fully understand that. However I am still quite confused over the fundamental principles of how the scripts interact when it comes to 3D Hotspot editing.

      What I am hoping to do is in simplest terms: make a hotspot a “drag button”, when triggered every time, it adds 1000mm to A. The button resets itself after each use.

      MASTER SCRIPT

      if flip_switch then
         A = A + 1
         flip_swtich = 0
      endif

      3D SCRIPT

      _unID = 1
      hotspot 	0,		0,		0,		_unID,	flip_switch,	1+128,	flip_switch: _unID=_unID+1
      hotspot 	-1,		0,		0,		_unID,	flip_switch,	3,	flip_switch: _unID=_unID+1
      hotspot 	flip_switch,	0,		0,		_unID,	flip_switch,	2,	flip_switch: _unID=_unID+1
      
      BLOCK A, B, ZZYZX

      PARAMETER SCRIPT

      
      values "flip_switch" 0,1
      
      if GLOB_MODPAR_NAME = "flip_switch" then
      	parameters flip_switch = flip_switch
      	parameters A=A
      endif
      

      However I found that the interaction between Parameter Script/3D Script/GLOB_MODPAR_NAME very weird during 3D Hotspot operations, GLOB_MODPAR_NAME is triggered continuously before the user finishes with the edit. The example above triggeres flip_switch 8 times every time you touch it, and it does not reset itself to 0 either.

      That’s why I am wondering if GLOB_FEEDBACK_MODE will be able to ensure that the editing is finished, THEN we reset the switch and change A.

      However what I found out the hard way is that even when the user finishes editing (i.e. during the last parameter script run before everything ends), GLOB_FEEDBACK_MODE is still TRUE even though at that point editing has ended.

      I probably could figure this out by some lengthy trials…

      NOTE This is AC19 I am testing on though.

      Bond Bryan Architects, Westerham, UK

    • #4107
      Barry Kelly
      Participant

      This is the best I can come up with at the moment – need to get back to real work!

      values "flip_switch" 0,1
      
      n = APPLICATION_QUERY ("parameter_script", "firstoccasion_in_progress", isFirstRun)
      
      if isFirstRun then
      	if flip_switch = 1 then
      		A = A + 1
      		PARAMETERS A = A
      !!		flip_switch = 0
      !!		PARAMETERS flip_switch = flip_switch
      	endif
      endif

      This is what you need in the parameter script.
      Delete what you have in the master script.

      This works in 3D but you have to reset the hotspot to zero your self.
      Odd thing is the info box increases by 3000 but the object shows correct at 2000 (see image).
      If you open the settings dialogue it will increase another 1000 to 5000.
      Not sure what is going on there.

      If you in-comment the two lines in my script then it all works perfectly but the hotspot does not stretch any more as it is obviously being reset before the object adjusts.
      But changing the parameter in the settings dialogue works.

      This may give some help or maybe someone else has some better ideas.

      Barry.

      Attachments:

      Versions 6.5 to 22
      Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
      Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

Viewing 4 reply threads
  • The forum ‘Parameter connections’ is closed to new topics and replies.