Forum Replies Created
-
AuthorPosts
-
Ben Cohen
ParticipantHi Barry
Try scripting a tread using STAIR_TREAD_GEOMETRY and the other globals.
They all return 0Ben Cohen
ParticipantAdd this to your code
parameters script
if GLOB_UI_BUTTON_ID <> 0 then
parameters n = n + GLOB_UI_BUTTON_ID
GLOB_UI_BUTTON_ID = 0
endifinterface script
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
next iHTH 🙂
Ben
Ben Cohen
ParticipantHi
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
endifBen Cohen
ParticipantHey Barry
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
Attachments:
Ben Cohen
ParticipantInstead 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: https://gdl.graphisoft.com/tips-and-tricks/display-properties-with-labels/
Great tip!!thanks Gergely 🙂
Ben Cohen
ParticipantI have used this to migrate a GPO
You have to set the GUID’s in the migration section of the GDL editoractualGuid = 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'
Ben Cohen
ParticipantHi Barry
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
Ben Cohen
Participant1. 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 #1730Ben Cohen
ParticipantHi Barry
New forum, wow….
Have you tried a ‘fixed named optional parameter’?
ac_wall_profile_name
This may work?
-
AuthorPosts