Creating window

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello

I have fund this script for creating a window in hyperview

 

I am not able to figure out few things

 

1.so what are these following commands?? Where can I found help for these commands??

hwt::DluWidth

hwt::AppFont

hwt::WindowRecess

 

and what is following line means?

set types {
        {{H3D File}      {'.h3d' }        }
        {{OP2 File}      {'.op2' }        }
        {{All Files}             * }

 

And also what is mean by following commands (not from below script but found somewhere else)

set t [::post::GetT];

::post::GetPostHandle pst$t

And I am not able to find help for above commands

 

catch {namespace delete ::CaptureGIF}

namespace eval ::CaptureGIF {
    variable str_master1 '';
    variable str_master2 '';
    variable str_master3 '';
    variable str_master4 '';
    variable ang_incr;
    variable def_val;
}


proc ::CaptureGIF::MainGUI {} {
    variable str_slave;
    variable str_master1 '';
    variable str_master2 '';
    variable str_master3 '';
    variable str_master4 '';
    variable e1; 
    variable e2;
    variable l1; 
    variable l2;
    variable e3;
    variable l3; 
    variable e4;
    variable l4; 
    variable e5;
    variable l5; 
    variable ang_incr;
    variable def_val;

    set dlgWidth  [ hwt::DluWidth 240 [ hwt::AppFont ]];
    set dlgHeight [ hwt::DluHeight  250 [ hwt::AppFont ]];

    set min_dlgWidth  [ hwt::DluWidth  240 [ hwt::AppFont ]];
    set min_dlgHeight [ hwt::DluHeight  120 [ hwt::AppFont ]];

    hwt::CreateWindow win \
        -minsize 200 100 \
        -maxsize 1000 100 \
        -noGeometrySaving \
        -geometry ${dlgWidth}x${dlgHeight} \
        -cancelButton Cancel \
        -defaultButton Cancel \
        -acceptButton Accept \
        -minSize $min_dlgWidth $min_dlgHeight \
        -acceptFunc '::CaptureGIF::StartProcess' \
        -cancelFunc '::CaptureGIF::Cancel_func' \
        -windowtitle 'Capture GIF' \
        -post;

    #Create recess to hold frames
    set recess [hwt::WindowRecess win];
    
    set types {
        {{H3D File}      {'.h3d' }        }
        {{OP2 File}      {'.op2' }        }
        {{All Files}             * }
    }    

    grid columnconfigure $recess 1 -weight 1 ;

    set l1 [::hwtk::label $recess.l1 -text 'Enter Animation end angle:']
    set e1 [::hwtk::entry $recess.e1 -width 200 -takefocus 1 -textvariable  ::CaptureGIF::str_master1];
    grid $l1 -row 1 -col 0 -sticky w -padx 4 -pady 4;
    grid $e1 -row 1 -col 1 -sticky e -padx 4 -pady 4;
    $recess.e1 set 315;

    set l2 [::hwtk::label $recess.l2 -text 'Enter mode numbers :']
    set e2 [::hwtk::entry $recess.e2 -width 200 -takefocus 1 -help 'Enter mode numbers separated by comma' -textvariable  ::CaptureGIF::str_master2];
    grid $l2 -row 2 -col 0 -sticky w -padx 4 -pady 4;
    grid $e2 -row 2 -col 1 -sticky e -padx 4 -pady 4;    
    
    set l3 [::hwtk::label $recess.l3 -text 'Enter scaling factor :']
    set e3 [::hwtk::entry $recess.e3 -width 200 -takefocus 1 -textvariable  ::CaptureGIF::str_master3];
    grid $l3 -row 3 -col 0 -sticky w -padx 4 -pady 4;
    grid $e3 -row 3 -col 1 -sticky e -padx 4 -pady 4;
    
    set l4 [::hwtk::label $recess.l4 -text 'Enter time delay :']
    set e4 [::hwtk::entry $recess.e4 -width 200 -takefocus 1 -textvariable  ::CaptureGIF::str_master4];
    grid $l4 -row 4 -col 0 -sticky w -padx 4 -pady 4;
    grid $e4 -row 4 -col 1 -sticky e -padx 4 -pady 4;
    $recess.e4 set 0.9;
    
    set increments


  1.     hwtk::label $recess.l5 -text 'Angular increments' 
        set ang_incr [hwtk::combobox $recess.cb5 -values $increments]
        grid columnconfigure $recess 1 -weight 1
            grid $recess.l5 -row 5 -col 0 -sticky w;
            grid $recess.cb5 -row 5 -col 1 -sticky w -pady 4
        $recess.cb5 set [lindex $increments 4]

    hwt::KeepOnTop win
}
 

 

Answers

  • tinh
    tinh Altair Community Member
    edited December 2016

    Hi

    You can find help for that on menu Help>Hyperworks Help Home

    -> Hyperworks Tools  -> Hyperworks GUI Toolkit

     

    for 'types', it is file types used for tk_getOpenFile , refer to this command in tk manual

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    thank you for reply

     

    but I didnt find help for this command there

  • tinh
    tinh Altair Community Member
    edited December 2016

    try start-all program-altair hyperwork-tool

    looking for hyperworks gui tool kit