Jump to content

AlexanderP

Members
  • Content Count

    11
  • Joined

  • Last visited

About AlexanderP

  • Rank
    Beginner

Profile Information

  • Country
    Belgium
  • Are you University user?
    Yes
  1. AlexanderP

    Edit Legend in HyperView

    Hi all How to change legend using only .tcl scripts?
  2. AlexanderP

    combobox

    This works: set combo1 [ttk::combobox $frame.combo1 -values $values] pack $frame.combo1 -side top -padx 2 -pady 2
  3. AlexanderP

    combobox

    I use set mylist [list C C++ Lua Tcl] pack [ttk::combobox .s1 -textvariable combovalue -values $mylist -background yellow -font {Helvetica -18 bold} -foreground red -width 40 -justify left -state normal] set combovalue "C" And combobox appears on new form But I need to add it to my frame (as buttons) And i don't know how to do this
  4. AlexanderP

    combobox

    I know about this command But I can't place combobox to frame
  5. AlexanderP

    combobox

    Hello all I have a GUI with frame and buttons. How I can put WITH THIS CODE combobox to this frame? In the marked in red region? And code: destroy .buttons destroy .combo destroy .combo1 toplevel .buttons wm title .buttons "Menu" set count 0 proc add_frame title { global frame count set bold 0 set frame .buttons.frame$count frame $frame -border 5 -relief groove label $frame.label -text $title -font "arial 10 bold" -foreground red pack $frame -side left -padx 2 -pady 2 -anchor n -fill both pack $frame.label -side top -padx 2 -pady 2 incr count } proc add_button {title command} { global frame count button $frame.$count -text $title -command $command -font "arial 10" pack $frame.$count -side top -pady 1 -padx 1 -fill x incr count } add_frame "Components view" add_button "Show all mesh" {} add_button "Hide all mesh" {} add_button "Show all elements" { } add_button "Hide all elements" { } add_button "Show surface edges" {} add_button "22222" {} add_button "33333" {} add_frame "2D Mesh ()" add_button "Add mesh to displayed surfs" {}
  6. Hello all. I have a question. Is it possible to create with .tcl commands general surfaces, but for all solids. It is very tedious to constantly perform repeated commands. And script could solve this problem. For example this detail: This surfaces were made by next commands: add_button "Make boolean surfaces" { *createmark solids 1 1 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2 *createmark solids 1 1 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2 *createmark solids 1 2 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2 *createmark solids 1 3 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2 *createmark solids 1 4 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2 *createmark solids 1 5 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2 *createmark solids 1 2 *createmark solids 2 2 *boolean_merge_solids 1 2 14 2 *createmark solids 1 2 *createmark solids 2 3 *boolean_merge_solids 1 2 14 2 *createmark solids 1 2 *createmark solids 2 4 *boolean_merge_solids 1 2 14 2 *createmark solids 1 2 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2 *createmark solids 1 3 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2 *createmark solids 1 3 *createmark solids 2 2 *boolean_merge_solids 1 2 14 2} But if we have about 100+ solids and more? How to solve this question\problem? Thanks!
  7. Hello all How I can run .tcl script using a button? I searched a lot of information, but can't found I have a procedure: proc add_button {title command} { global frame count button $frame.$count -text $title -command $command -font "arial 10" pack $frame.$count -side top -pady 1 -padx 1 -fill x incr count } Then I call it: add_frame "TCL" add_button "test open file" {*readfile "C:/temp/11.tcl"} add_button "test open file 2" {*readfile "C:/temp/clip.hm"} But opening a .hm file works good, but .tcl does not work and I have an error: 0 0 while executing "*readfile "C:/temp/11.tcl"" invoked from within ".buttons.frame15.18 invoke" ("uplevel" body line 1) invoked from within "uplevel #0 [list $w invoke]" (procedure "tk::ButtonUp" line 24) invoked from within "tk::ButtonUp .buttons.frame15.18" (command bound to event) Can everyone explain me how correct this error or how can I run a .tcl file using buttons?
  8. Hello all I created a graphical interface (piece of them in the picture below): I am interested in the following questions: 1. How can I bind running a .tcl file to a button click? (see the fourth question) 2. How to change the font size on the background? (in HyperView) *TitleFont("Arial", 1, 0, 12) do not work 3. While I work in HyperMesh, i have command.tcl, where all my operations are recorded. But in HyperView I don't find such file. Then I try to "File- Save session - open it in notepad". But it is not log file Is there such a file to see the commands being invoked? 4. I'm try to change legend and notes in HyperView. After wrote a .tcl to "legend file" But it is don't work from button. And worked, if we choose in manual mode (as picture in this topic): add_button "legend" {proc ::post::LoadSettings { legend_handle } { $legend_handle SetType user $legend_handle SetFilter Linear $legend_handle SetPosition upperleft $legend_handle SetNumericFormat "fixed" $legend_handle SetNumericPrecision "0" $legend_handle SetReverseEnable false $legend_handle SetSeparatorWidth 0 $legend_handle SetNumberOfColors 11 $legend_handle SetColor 0 "255 255 255" $legend_handle SetColor 1 " 0 0 255" $legend_handle SetColor 2 " 0 227 255" $legend_handle SetColor 3 " 0 255 170" $legend_handle SetColor 4 " 0 255 57" $legend_handle SetColor 5 " 57 255 0" $legend_handle SetColor 6 "170 255 0" $legend_handle SetColor 7 "255 227 0" $legend_handle SetColor 8 "255 113 0" $legend_handle SetColor 9 "255 2 0" $legend_handle SetColor 10 "255 0 0" $legend_handle SetColor 11 "255 255 255" $legend_handle OverrideValue 0 -36 true $legend_handle OverrideValue 1 42 true $legend_handle OverrideValue 9 140 false $legend_handle GetHeaderAttributeHandle attr_handle attr_handle SetVisibility false catch { attr_handle SetFont "Arial"}; attr_handle SetHeight 10 attr_handle SetColor "255 255 255" attr_handle SetSlant "regular" attr_handle SetWeight "regular" attr_handle ReleaseHandle $legend_handle GetTitleAttributeHandle attr_handle attr_handle SetVisibility true catch { attr_handle SetFont "Arial"}; attr_handle SetHeight 10 attr_handle SetColor "255 255 255" attr_handle SetSlant "regular" attr_handle SetWeight "regular" attr_handle ReleaseHandle $legend_handle GetNumberAttributeHandle attr_handle catch { attr_handle SetFont "Arial"}; attr_handle SetHeight 10 attr_handle SetColor "255 255 255" attr_handle SetSlant "regular" attr_handle SetWeight "regular" attr_handle ReleaseHandle $legend_handle SetMinMaxVisibility false max $legend_handle SetMinMaxVisibility false min $legend_handle SetMinMaxVisibility false max_local $legend_handle SetMinMaxVisibility false min_local $legend_handle SetMinMaxVisibility false entity $legend_handle SetMinMaxVisibility false bymodel $legend_handle SetTransparency true $legend_handle SetBackgroundColor "255 255 255" $legend_handle GetFooterAttributeHandle attr_handle attr_handle SetVisibility false catch { attr_handle SetFont "Arial"}; attr_handle SetHeight 10 attr_handle SetColor "255 255 255" attr_handle SetSlant "regular" attr_handle SetWeight "regular" attr_handle ReleaseHandle } } Thank you in advance for your help
  9. AlexanderP

    Add button script

    Hello all I'm have a question How I can add a button to tab area\menu with a tcl\tk script? P.S. "View ->Toolbars" and then i don't have "Options".
  10. AlexanderP

    Mesh script

    Hi all I'm new in hypermesh and scripting and interested in creating a mesh using scripts. Is it possible? Are there any ready-made scripts? thanks
×