Forum Replies Created
Try scripting a tread using STAIR_TREAD_GEOMETRY and the other globals.
They all return 0
Add this to your code
if GLOB_UI_BUTTON_ID <> 0 then
parameters n = n + GLOB_UI_BUTTON_ID
GLOB_UI_BUTTON_ID = 0
for i=1 to n
ui_button ui_function, “-“, _x2+200, _y, 20, 20, -1
ui_button ui_function, “+”, _x2+220, _y, 20, 20, 1
ui_style 0, 0 :ui_outfield “mat”+str(i, 1, 0) ,_x, _y :ui_style 0, 0 :ui_infield vari_mat_[i], _x2, _y-5, _sx-200, _sy :_y=_y+_d
Is the problem that parameter script is running more than once – therefore “n = n + 1” is not working as expected?
If so you have two possible solutions
1. Under details ‘Compatibility Options’ check the box ‘Run parameter script only once’
2. You could also use “APPLICATION_QUERY” to also make sure it only runs once
n = APPLICATION_QUERY (“parameter_script”, “firstoccasion_in_progress”, isFirstRun)
if isFirstRun then
// do stuff
A small work around, until we have multi-line field editing, is to use ui_tooltip to give the user a preview of the field 🙂 HTH
Instead of this, you can use it in the ui script, and use the returned values in a custom popup infield, as it is written here: http://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels/
Great tip!!thanks Gergely 🙂
1. GLOB_SCRIPT_TYPE is ok in the master script.
This is very interesting. So if we use “if GLOB_SCRIPT_TYPE <> 5 then” in the master script to prevent the code from running in the parameter script, we will not receive an error?
October 13, 2015 at 09:03 in reply to: WALL_COMPS_NAME not being recognised from verion 17 onwards #1730
New forum, wow….
Have you tried a ‘fixed named optional parameter’?
This may work?
October 30, 2015 at 03:24 in reply to: What is the proper replacement for GLOB_CONTEXT=1? #1855
I have used this to migrate a GPO
You have to set the GUID’s in the migration section of the GDL editor
actualGuid = FROM_GUID ! ============================================================================== ! Defined new parameters in migration ! ============================================================================== ! ============================================================================== ! electrical Different - (AC13 --> AC15) ! ============================================================================== if actualGuid = "3E6E2AC8-F1D9-4358-A538-5380B32D7718" or actualGuid = "24B2609D-DF7D-304B-9BD8-DEFB38036FFC" then actualGuid = "1498DFCB-525E-F74B-B986-1FFCDF5531AA" if type_gpo = 'Skirting Ht' then PARAMETERS skirting_ht = ZZYZX IF STRSUB(leg_nameTemp,STRLEN(leg_nameTemp)-6,7) = '250 AFL' then parameters skirting_ht = .3 parameters ZZYZX = .3 parameters std_leg_name = 1 endif endif ! ============================================================================== ! Set migration GUID ! ============================================================================== SETMIGRATIONGUID actualGUID MIGRATIONWARNING 'note this is migrated forward'
October 30, 2015 at 02:59 in reply to: What is the proper replacement for GLOB_CONTEXT=1? #1853
This is not really an answer to your glob_context issue. But..
You really need to look at the migration scripts. This is the answer to your problem. With the migration script you can determine the value of that redundant parameter and then set your new hotspot parameter accordingly. Its very very powerful. HTH