Ben Cohen

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Creating library parts – when there is no preview #3487

    Ben Cohen
    Participant

    Hi Barry

    Try scripting a tread using STAIR_TREAD_GEOMETRY and the other globals.
    They all return 0

  • in reply to: UI button – parameters #3449

    Ben Cohen
    Participant

    Add 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
    endif

    interface 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 i

    HTH ๐Ÿ™‚

    Ben

  • in reply to: UI button – parameters #3444

    Ben Cohen
    Participant

    Hi

    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
    endif

  • in reply to: Editing text in the graphical interface. #2967

    Ben Cohen
    Participant

    Hey 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:
  • in reply to: Use Properties from Property Manager #2924

    Ben Cohen
    Participant

    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 ๐Ÿ™‚

  • in reply to: Uploading to BIM Components #1756

    Ben Cohen
    Participant

    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?


  • Ben Cohen
    Participant

    Hi Barry

    New forum, wow….

    Have you tried a ‘fixed named optional parameter’?

    ac_wall_profile_name

    This may work?

  • in reply to: What is the proper replacement for GLOB_​CONTEXT=1? #1855

    Ben Cohen
    Participant

    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'
  • in reply to: What is the proper replacement for GLOB_​CONTEXT=1? #1853

    Ben Cohen
    Participant

    Hi 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

Viewing 9 posts - 1 through 9 (of 9 total)