Jump to content

Jeffersondhv

Members
  • Content Count

    47
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. vipin liked a post in a topic by Jeffersondhv in Problem with OpenFileEntry API   
    That solved it. Thanks @vipin!!!
  2. Jeffersondhv liked a post in a topic by vipin in Problem with OpenFileEntry API   
    Hi @Jeffersondhv,
     
    It is because you have already defined cmd_btn with the value 'Nothing'.
    The value of textVar is actually changing. Replace the line like this, it should be working.
    button $lbl_ref.import_ref -text $textVar -command {tk_messageBox -message $textVar -type ok} -bg #60C060
     
  3. Saravanan R liked a post in a topic by Jeffersondhv in Need TCL/TK learning advice   
    The big difference here stands on the specific functions HM uses, which are in a sense independent on the TCL language as it works as an additional package for the language.
    If you know the basics of programming and the syntax for TCL, I would suggest that you explore as much as you can the command.tcl file written by HM.
    This file is really useful as it records any action you do in the GUI into to a code format. Then looking at it, you can change the necessary arguments and others.
    To learn more about the available functions you can use with HM, please consult the "Scripts > Commands and Functions" part of the HM help. There you can understand the inputs for the HM functions and other capabilities you might be looking for.
     
    Hope this helps.
    Jefferson Vieira
  4. tinh liked a post in a topic by Jeffersondhv in Need TCL/TK learning advice   
    The big difference here stands on the specific functions HM uses, which are in a sense independent on the TCL language as it works as an additional package for the language.
    If you know the basics of programming and the syntax for TCL, I would suggest that you explore as much as you can the command.tcl file written by HM.
    This file is really useful as it records any action you do in the GUI into to a code format. Then looking at it, you can change the necessary arguments and others.
    To learn more about the available functions you can use with HM, please consult the "Scripts > Commands and Functions" part of the HM help. There you can understand the inputs for the HM functions and other capabilities you might be looking for.
     
    Hope this helps.
    Jefferson Vieira
  5. Jeffersondhv liked a post in a topic by Bachelor22 in Catching An Error   
    Thanks for your help guys, this helped us a lot!
  6. Bachelor22 liked a post in a topic by Jeffersondhv in Catching An Error   
    If no result file is written, then all the marks and node lists you create after the analysis is complete are blank.
    So you could try to identify if the result file exists, or simply check if these marks are blank.
  7. Bachelor22 liked a post in a topic by Jeffersondhv in Input Mask to choose Elements or Nodes   
    Ok, so basically you want an user input to decide which type of selection must be used.
    This can be done in a variety of ways, using simpler forms or the more elegant ones with graphic interface.
     
    Using a simple yes or no question, this would be like so:
    set answer [tk_messageBox -message "What type of load would you like to input? \n Yes: Force \n No: Pressure" -type yesno -icon question] switch -- $answer { yes { "Code for Force load" } no { "Code for Pressure load" } } If you want to have something nicer (which requires more work), you can use for example a radiobutton.
    But in this case you need to build the hole interface for the user navigation like confirmation and return buttons and maybe even other options.
    A code snippet to use a radiobutton would be like so:
     
    #Get preview frame set w [hwtk::demo::getpreviewframe] set w [hwtk::frame $w.frame] pack $w -anchor nw -padx 4 set ::feedback "" set ::currentLoad "Force" pack [hwtk::labelframe $w.lf -text "Select the type of Loading" -padding 2] -anchor nw foreach load {Force Pressure} { pack [hwtk::radiobutton $w.lf.b$load -text $load -variable ::currentLoad \ -value $load \ -command "set ::feedback $load" \ -help "$load"] -side top -pady 2 -fill x } pack [hwtk::label $w.label -text "Active Load:"] \ [hwtk::label $w.label1 -textvariable ::feedback] -side left -pady 4 Hopefully this is helpful.
  8. Bachelor22 liked a post in a topic by Jeffersondhv in Getting Access To Aspect Ratio Values   
    There is a variety of functions you can use to achieve this:
     
    *elementtestaspect Help
    hm_createmark elems 1 "greater than value" "aspect 3" Help
    hm_getelemcheckbounds Help
     
    I hope this can help you achieve what you intend.
  9. vipin liked a post in a topic by Jeffersondhv in Input Mask to choose Elements or Nodes   
    Ok, so basically you want an user input to decide which type of selection must be used.
    This can be done in a variety of ways, using simpler forms or the more elegant ones with graphic interface.
     
    Using a simple yes or no question, this would be like so:
    set answer [tk_messageBox -message "What type of load would you like to input? \n Yes: Force \n No: Pressure" -type yesno -icon question] switch -- $answer { yes { "Code for Force load" } no { "Code for Pressure load" } } If you want to have something nicer (which requires more work), you can use for example a radiobutton.
    But in this case you need to build the hole interface for the user navigation like confirmation and return buttons and maybe even other options.
    A code snippet to use a radiobutton would be like so:
     
    #Get preview frame set w [hwtk::demo::getpreviewframe] set w [hwtk::frame $w.frame] pack $w -anchor nw -padx 4 set ::feedback "" set ::currentLoad "Force" pack [hwtk::labelframe $w.lf -text "Select the type of Loading" -padding 2] -anchor nw foreach load {Force Pressure} { pack [hwtk::radiobutton $w.lf.b$load -text $load -variable ::currentLoad \ -value $load \ -command "set ::feedback $load" \ -help "$load"] -side top -pady 2 -fill x } pack [hwtk::label $w.label -text "Active Load:"] \ [hwtk::label $w.label1 -textvariable ::feedback] -side left -pady 4 Hopefully this is helpful.
  10. Jeffersondhv liked a post in a topic by tinh in Script to Compare Geometry Files   
    Maybe cad has some problems
    You can use comparison tool, don't need script
    It is in pulldown menu Mesh
  11. Jeffersondhv liked a post in a topic by tinh in GUI for HyperMesh Script   
    Hi
    Set w .wDemo
    Destroy $w
    Toplevel $w
    Wm transient $w .
    For {set i 1} {$i<5} {incr i} {
         Frame $w.f$i
         Label $w.f$i.lbl -text "Input $i ="
         Entry $w.f$i.ent
         Pack $w.f$i.lbl -side left -anchor w
         Pack $w.f$i.ent -side right -anchor e
         Pack $w.f$i -side top -anchor nw -fill x
    }
    Button $w.b -text Proceed
    Pack $w.b -side top -anchor e
  12. Jeffersondhv liked a post in a topic by Imoto in To capture element quality check display messages   
    Tinh is right, HyperMesh and HyperMesh Desktop are using different frame.
     
    @Jeffersondhv
    If you want to correspond both cases, following example can help you.
     
    if {[file tail [hm_info -appinfo SPECIFIEDPATH hm]] == "hmopengl.exe"} {
     puts [.mainFrame.bottom.message_icon config -image];
     puts [.mainFrame.bottom.message_label config -text];
    } else {
     puts [.mainFrame.bottom.leftfrm.label config -image];
     puts [.mainFrame.bottom.leftfrm.label config -text];
    }
  13. Jeffersondhv liked a post in a topic by tinh in To capture element quality check display messages   
    Cannot get %fail directly, you have to calculate it by #fails/total
    Use *elementtest... commands
  14. Jeffersondhv liked a post in a topic by tinh in To capture element quality check display messages   
    If you are usinh hypermesh desktop, it is .mainFrame.bottom.leftfrm.label
     
    In HM, it is referred by variable $::HM_Framework::p_message_label
  15. Jeffersondhv liked a post in a topic by tinh in GUI for HyperMesh Script   
    Sure, that can.
    you need to make a window (using command 'toplevel'), or a frame (using command 'frame')
    create buttons (using command 'button'), entry box (using command 'entry'), other widgets like labels, menus, ...
    and then bring them into the toplevel window (using command 'pack', or 'grid', or 'place')
     
    many Tk commands help with building GUI you can refer here:
    https://www.tcl.tk/man/tcl8.5/TkCmd/contents.htm
     
  16. Jeffersondhv liked a post in a topic by tinh in Duplication of elements with different orientation   
    Hi, you should use *positionmark command
×
×
  • Create New...