Jump to content

varthamanan

Members
  • Content Count

    26
  • Joined

  • Last visited

Everything posted by varthamanan

  1. how to compile the tcl script with freeware software ,please share the link of the software
  2. 1)I am calculating resultant by using math (sqrt(p6w7c1.y^2+p6w6c1.y^2+p6w5c1.y^2) 2) wtih that above math result is (0.0709184) (hypergraph considering only 7 decimals) 3) The actual result is (0.0709183875) 4) I want to extract the results wth ten decimal. Please help, if any one know the solution.
  3. #::hwtk::table proc SetValueCallback { row col value } { puts "$value" return true } proc GetValueList {col row} { return } ::hwtk::dialog .d -title "::hwtk::table" set table [::hwtk::table [.d recess].table] pack $table -fill both -expand true $table columncreate int -type int -text "Integer" -validatecommand "SetValueCallback %I %C %V" $table columncreate double -type real -text "Double" -validatecommand "SetValueCallback %I %C %V" $table columncreate color -type intcolor -image palette-16.png -validatecommand "SetValueCallback %I %C %V" $table columncreate city -type combobox -text "Combobox" -valuelistcommand "GetValueList city" -validatecommand "SetValueCallback %I %C %V" $table columncreate string -text "String" -validatecommand "SetValueCallback %I %C %V" for {set j 1} {$j < 5} {incr j} { set color [expr {int(rand()*64)}] set values "int $j double $j.0 color $color city Troy string {String value $j}"; $table rowinsert end row$j -values $values } .d post proc accept_func {args} { tk_messageBox -message "You can have any function defined for this button" -title "Accept Function" -icon info }
  4. Hello, I found code some code like this you can use for any panels selection hm_pushpanel "project" set id [hm_getcolnumber {project} 1 ] hm_setcollector "project" $id "comps" Thanks and Regards P.Varthamanan
  5. I have script something like this ########################################################## first script.tcl proc firstscript {} { variable i set i 10 } #======================================================= secondscript.tcl proc secondscript {} { variable i puts $i } i struggling lot because of this problem. I ran the first script, in the script I set the variable set i 10 i want get variable value $i in the second script i tried with global , variable options Please give some suggestion or solution Thanks in advance Thanks and Regards P.Varthamanan
  6. Thanks for post Rahul can you provide link for study hyperview script I am able to do with .bind key option, I need command for the turn off and on in hyperview I want to create display option in hyperview, like D shortcut key in hypermesh, can you help me
  7. what is the difference between altair connect and altair cleint login
  8. i am not able post image, why any one can explain
  9. this is my toolbar created by most using command
  10. #created #varthamanan proc CreateToolBar { carName jataList } { #Create Toolbar ::HM_Framework:_CreateMinibar . $carName; #Add Icon foreach Data $jataList { set iconfile [ lindex $Data 2 ] set cmd [ lindex $Data 1 ] set name [ lindex $Data 0 ] ::HM_Framework:_AddIconToMinibar $carName \ [ list p_CreateMinibarIcon [ file tail $iconfile ] $cmd $name 1 ]; } #Pack Toolbar ::HM_Framework:_AddMinibarToDockframe $carName .dockframe_center; #Destroy } proc RedrawWindows { } { set pos [ hm_getcommandposition ] if { $pos == "top" } { hm_setcommandposition bottom hm_setcommandposition top } else { hm_setcommandposition top hm_setcommandposition bottom } } set jataList "" # quick edit panel set EditIcon "nodesInterpolateOnSurf-24.gif" set jataList "$jataList { {Quick Edit} { ::face {args} } $EditIcon }" # automesh panel set MeshIcon "meshLines-32.gif" set jataList "$jataList { {AutoMesh} { hm_pushpanel \"automesh\" } $MeshIcon }" # check panel set CheckIcon "check.gif" set jataList "$jataList { {Element Checks} { hm_pushpanel \"check elems\" } $CheckIcon }" # # vis button set MeshIcon "distanceBetweenNodes-24.gif" set jataList "$jataList { {Distance} { hm_pushpanel \"distance\" } $MeshIcon }" # # vis button set MeshIcon "edgesGeneral-24.gif" set jataList "$jataList { {Edges} { hm_pushpanel \"edges\" } $MeshIcon }" # vis button set MeshIcon "elem-normal.gif" set jataList "$jataList { {Normals} { hm_pushpanel \"normals\" } $MeshIcon }" # vis button set MeshIcon "intersectionGUI.gif" set jataList "$jataList { {intersection} { hm_pushpanel \"penetration\" } $MeshIcon }" # vis button set MeshIcon "numbers-24.gif" set jataList "$jataList { {Numbers} { hm_pushpanel \"numbers\" } $MeshIcon }" # vis button set MeshIcon "pan.gif" set jataList "$jataList { {Translate} { hm_pushpanel \"translate\" } $MeshIcon }" # vis button set MeshIcon "pointsExtractParametric-24.gif" set jataList "$jataList { {Project} { hm_pushpanel \"project\" } $MeshIcon }" # vis button set MeshIcon "blankNesting-24.gif" set jataList "$jataList { {Reflect} { hm_pushpanel \"reflect\" } $MeshIcon }" # vis button set MeshIcon "gap-24.gif" set jataList "$jataList { {Replace} { hm_pushpanel \"replace\" } $MeshIcon }" # vis button set MeshIcon "erase-16.gif" set jataList "$jataList { {Edit elements} { hm_pushpanel \"edit element\" } $MeshIcon }" # vis button set MeshIcon "objectives.gif" set jataList "$jataList { {Replace} { hm_pushpanel \"split\" } $MeshIcon }" # # vis button set MeshIcon "linesExtractEdge-24.gif" set jataList "$jataList { {Smooth} { hm_pushpanel \"smooth\" } $MeshIcon }" # # vis button set MeshIcon "linesOffsetConstant-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"node edit\" } $MeshIcon }" # # vis button set MeshIcon "post-shaded-16.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"ruled\" } $MeshIcon }" # # vis button set MeshIcon "3dElements-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"drag\" } $MeshIcon }" # # vis button set MeshIcon "solidDragLine-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"solid map\" } $MeshIcon }" # # vis button set MeshIcon "morphingVolume-16.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"HyperMorph\" } $MeshIcon }" proc ::face {args} { *appendmark elements 1 "by adjacent" hm_saveusermark elems 1; *appendmark elements 1 "retrieve" hm_highlightmark elems 1 h; } # create toolbar catch { ::HM_Framework:_DeleteMinibar CustomToolBar } CreateToolBar fanels $jataList # redraw window RedrawWindows
  11. #created #varthamanan proc CreateToolBar { carName jataList } { #Create Toolbar ::HM_Framework:_CreateMinibar . $carName; #Add Icon foreach Data $jataList { set iconfile [ lindex $Data 2 ] set cmd [ lindex $Data 1 ] set name [ lindex $Data 0 ] ::HM_Framework:_AddIconToMinibar $carName \ [ list p_CreateMinibarIcon [ file tail $iconfile ] $cmd $name 1 ]; } #Pack Toolbar ::HM_Framework:_AddMinibarToDockframe $carName .dockframe_center; #Destroy } proc RedrawWindows { } { set pos [ hm_getcommandposition ] if { $pos == "top" } { hm_setcommandposition bottom hm_setcommandposition top } else { hm_setcommandposition top hm_setcommandposition bottom } } set jataList "" # quick edit panel set EditIcon "nodesInterpolateOnSurf-24.gif" set jataList "$jataList { {Quick Edit} { ::face {args} } $EditIcon }" # automesh panel set MeshIcon "meshLines-32.gif" set jataList "$jataList { {AutoMesh} { hm_pushpanel \"automesh\" } $MeshIcon }" # check panel set CheckIcon "check.gif" set jataList "$jataList { {Element Checks} { hm_pushpanel \"check elems\" } $CheckIcon }" # # vis button set MeshIcon "distanceBetweenNodes-24.gif" set jataList "$jataList { {Distance} { hm_pushpanel \"distance\" } $MeshIcon }" # # vis button set MeshIcon "edgesGeneral-24.gif" set jataList "$jataList { {Edges} { hm_pushpanel \"edges\" } $MeshIcon }" # vis button set MeshIcon "elem-normal.gif" set jataList "$jataList { {Normals} { hm_pushpanel \"normals\" } $MeshIcon }" # vis button set MeshIcon "intersectionGUI.gif" set jataList "$jataList { {intersection} { hm_pushpanel \"penetration\" } $MeshIcon }" # vis button set MeshIcon "numbers-24.gif" set jataList "$jataList { {Numbers} { hm_pushpanel \"numbers\" } $MeshIcon }" # vis button set MeshIcon "pan.gif" set jataList "$jataList { {Translate} { hm_pushpanel \"translate\" } $MeshIcon }" # vis button set MeshIcon "pointsExtractParametric-24.gif" set jataList "$jataList { {Project} { hm_pushpanel \"project\" } $MeshIcon }" # vis button set MeshIcon "blankNesting-24.gif" set jataList "$jataList { {Reflect} { hm_pushpanel \"reflect\" } $MeshIcon }" # vis button set MeshIcon "gap-24.gif" set jataList "$jataList { {Replace} { hm_pushpanel \"replace\" } $MeshIcon }" # vis button set MeshIcon "erase-16.gif" set jataList "$jataList { {Edit elements} { hm_pushpanel \"edit element\" } $MeshIcon }" # vis button set MeshIcon "objectives.gif" set jataList "$jataList { {Replace} { hm_pushpanel \"split\" } $MeshIcon }" # # vis button set MeshIcon "linesExtractEdge-24.gif" set jataList "$jataList { {Smooth} { hm_pushpanel \"smooth\" } $MeshIcon }" # # vis button set MeshIcon "linesOffsetConstant-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"node edit\" } $MeshIcon }" # # vis button set MeshIcon "post-shaded-16.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"ruled\" } $MeshIcon }" # # vis button set MeshIcon "3dElements-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"drag\" } $MeshIcon }" # # vis button set MeshIcon "solidDragLine-24.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"solid map\" } $MeshIcon }" # # vis button set MeshIcon "morphingVolume-16.gif" set jataList "$jataList { {node edit} { hm_pushpanel \"HyperMorph\" } $MeshIcon }" proc ::face {args} { *appendmark elements 1 "by adjacent" hm_saveusermark elems 1; *appendmark elements 1 "retrieve" hm_highlightmark elems 1 h; } # create toolbar catch { ::HM_Framework:_DeleteMinibar CustomToolBar } CreateToolBar fanels $jataList # redraw window RedrawWindows
  12. this is my script its work fine , i bind the keys with no 1 2 3 but i want make it work with in gui with double middle click are some some other key
  13. how to bind key working in a gui like (shift left click) for selection window , i made the script similar to the selection windows , i am not able to bind the key working in gui and how to remove the bind key
  14. *createmarkpanel surfaces 1 "select any one surfaces" *appendmark surfaces 1 "by face" you try this
  15. you can rename its work like textpad, it replaces property name material name also
  16. proc rename_things { } { variable sFrom variable sTo variable colValues foreach col [array names colValues] { if {$colValues($col) == 1} { foreach setName [hm_entitylist $col name] { if {[set newName [string map [list $sFrom $sTo] $setName]]!= $setName} { catch {*renamecollector $col $setName $newName} } } } } } proc initColNames { } { variable colNames set colNames(nameList) [list comps props materials loadcols sets groups beamsectcols systemcols shapes vectorcols] set colNames(comps) "Components" set colNames(props) "Propertys" set colNames(materials) "Materials" set colNames(loadcols) "Load Collectors" set colNames(groups) "Groups" set colNames(beamsectcols) "Beam Section Collectors" set colNames(systemcols) "System Collectors" set colNames(vectorcols) "Vector Collectors" set colNames(shapes) "Shapes" set colNames(sets) "Entity Sets" } proc buildGUI { } { variable colNames variable sFrom variable sTo variable colValues set sFrom "" set sTo "" set curNs [namespace current] # destroy window if it already exist if {[winfo exists .build_renameGui]} { destroy .build_renameGui } # create window set build_expand [ hwt::CreateWindow build_renameGui \ -windowtitle "Modify Names : Altair Hyd" \ -post \ -noGeometrySaving \ -geometry 260x320 \ -minSize 260 320 \ -noCommandArea \ ] ::hwt::KeepOnTop $build_expand set build_expandPanel [hwt::WindowRecess $build_expand]; # okCancleFrame set okcanFrame [frame $build_expand.ok] pack $okcanFrame -side top -anchor e set okButton [button $okcanFrame.ok -width 10 -text " OK " -command "destroy .build_renameGui; ${curNs}::rename_things"] set cancelButton [button $okcanFrame.cancel -width 10 -text "Discard" -command { destroy .build_renameGui; } ] pack $cancelButton $okButton -side right -padx 4 -pady 4 -anchor e # build fram set stringsFrame [frame $build_expandPanel.stringsframe] pack $stringsFrame -side top -anchor n set labelFrom [label $stringsFrame.labelfrom -text "Search for:" ] set valueFrom [entry $stringsFrame.valuefrom -textvariable ${curNs}::sFrom -width 25] grid $labelFrom -row 0 -column 0 -columnspan 2 -padx 5 -sticky e grid $valueFrom -row 0 -column 2 -padx 5 -sticky w set labelTo [label $stringsFrame.labelto -text "Replace with:" ] set valueTo [entry $stringsFrame.valueto -textvariable ${curNs}::sTo -width 25] grid $labelTo -row 1 -column 0 -columnspan 2 -padx 5 -sticky e grid $valueTo -row 1 -column 2 -padx 5 -sticky w set colFrame [hwt::LabeledFrame $build_expandPanel.colframe " Affected Entitys: " \ -side left -anchor nw -padx 2 -pady 10 -justify left ] set row 2 array unset colValues foreach col $colNames(nameList) { set colValues(${col}) 0 # Default wert... set label [label $colFrame.label$col -text $colNames($col)] set check [checkbutton $colFrame.check$col -variable ${curNs}::colValues(${col}) -onvalue 1] grid $check -row $row -column 0 -padx 2 grid $label -row $row -column 1 -padx 2 -sticky w incr row #foreach } return 1 } ## end proc buildGUI proc ::run {args} { initColNames buildGUI } run 0
  17. go to installed directory C:\Program Files\Altair\13.0\hm\scripts\macroAddWasher.tcl you can try this
  18. can you please share the macro as tcl file
×
×
  • Create New...