• Announcements

    • Rahul Ponginan

      Please click here for a short but important announcement   03/26/17

      Dear Users Our Commercial and Academic users around the world can use these same forums here as before i.e. the Altair Support Forum , Commercial users from India with solver queries can go to the Solver Forum for India Commercial Users , Academic Users from India and AOC India Participants are requested to go to the Forum for India Academic Users and AOC India Participants , We will be tending to all queries in all the forums promptly as before, thank you for your understanding. 

tinh

Members
  • Content count

    1205
  • Joined

  • Last visited

  • Days Won

    137

Everything posted by tinh

  1. Hi Try installing hw13. Newer versions may not be perfect. Could you show your graphic card details?
  2. Hi, I am sorry that it did not work. I will check it and inform you. It may take a bit long time because I don't use hyperview much
  3. Hi, you are asking about defaul shell execution that you have to retrieve from window registry like this: proc shellopenfile {filepath} { package require registry set fileext [file extension $filepath] if {[catch { #below is sample code in manual set type [registry get HKEY_CLASSES_ROOT\\$fileext {}] set path HKEY_CLASSES_ROOT\\$type\\Shell\\Open\\command set command [registry get $path {}] }]} { return -code error "Not found default program to open file $fileext" } #we can open file by command, but it's better to make a batch #because handle space in file path is so tough! set fpt [open temp.bat w] fconfigure $fpt -encoding utf-8 if {[string match "* %1" $command]||[string match "* \"%1\"" $command]} { set command [string range $command 0 [string last " " $command]] } append command " \"[file nativename $filepath]\"" puts $fpt $command close $fpt #now call the batch: exec temp.bat & set command } Now try open your file (remember to use / instead of \ , or use \\) shellopenfile "C:/VSURES33/ppt_documents/CAE.pptx"
  4. Hi, There a several ways, you can create your own panel by hm_framework, then push it and wait for its return. But I used an available hypermesh panel to do that , you can try using this proc: proc hm_callmenupanel args { set itemlist [lsort -unique $args] #we will use plots, because they can be deleted without affect to our data *entityhighlighting 0 *createmark plots 1 all if {[hm_marklength plots 1]} {*deletemark plots 1} hm_blockredraw 1 foreach item $itemlist { *xyplotcreate $item "" *displaycollectorwithfilter plots off $item 1 1 } hm_blockredraw 0 set selected [hm_callcollectorpanel plots] *createmark plots 1 all if {[hm_marklength plots 1]} {*deletemark plots 1} *entityhighlighting 1 set selected } Using it in your script like this: #need to input connector type: set SelectedConnector [ hm_callmenupanel "acm (shellgap+coating)" "acm (general)" "penta (mig)" "other connector types..." ] #continue process with selected connector...
  5. The temporary solution is do not run hmbatch.exe, if you just want to hide hypermesh window, at begining of your script, call withdraw command: wm withdraw . #your codes here... *jpegfilenamed Model_Iso.jpg #.... #stop: wm state . zoomed #or save file and quit: *writefile your_file.hm 1 exit
  6. OK. this is an easier way: *createmark surfs 1 displayed; # or *createmarkpanel surfs 1 "Select surfs:" foreach SurfId [hm_getmark surfs 1] { set CompName [hm_getentityvalue surfs $SurfId collector.name 1] *collectorcreateonly comps ${CompName}_$SurfId "" [expr round(rand()*63)+1] *createmark surfs 1 $SurfId *movemark surfs 1 ${CompName}_$SurfId }
  7. Maybe, no way. you are in batch mode that there is no GUI, how can you capture a GUI when you don't have it?
  8. Do you mean, you want to popup a panel to select something to continue your script? example: #you're doing something #you need to input connector type: set SelectedConnector [...] ;# popup a panel to select connector type #continue process with selected connector... Are you writing a script like above?
  9. This is template-style in case you want to write out 1e+6 nodes or more: set TplString { *nodes() *before() *string("ID,X,Y,Z") *end() *format() *field(integer,id,0) *string(",") *field(real,globalx,0) *string(",") *field(real,globaly,0) *string(",") *field(real,globalz,0) *string(",") *end() *output() } set fpt [open nodeexport.tpl w] puts $fpt $TplString close $fpt *displaynone; #=> only temp nodes are displayed hm_answernext yes *usercheck nodeexport.tpl YourFileName.csv 0
  10. Hi, the commands are: *edgesuppress $LineId *surfacemarksplitwithlines (you have to read reference help to know arguments)
  11. Maybe, it is not supported by TextView. Refer to TextView Help to see which elements are supported
  12. You can find a lot of hm template example to summary data in folder ../altair/.../templates/summary those can summary cog, moi,... of comps or other entities if we loop through big data and use hm_getentity... to access data, use expr to calculate, or * commands, it is very slow but looping by template, it is very fast. example i have to check face-face angle of solid elems, tcl can do: foreach elemid $elemlist3d { set angle [p_calculateFaceFaceAngle $elemid] if {$angle>$criteria} {lappend failedlist $elemid} } => it's slow with plenty of solid elems now using template: set TplString { *elements(204,,,) //calculate angle... ... *if([#angle>#criteria]) *markfailed() *endif() *output() } #write it to a text file set fpt [open demo.tpl w] puts $fpt $TplString close $fpt #call template processor *usercheck demo.tpl demo.out 0 => so hm will loop through elems and calculate angle (very fast), tcl just calls template processor
  13. Hi. Show us your slow codes. We may help it faster . if you have to summary big model, we may embed some hm native template codes into tcl if you have to calculate complex math expression, we may embed some hm templex codes into tcl
  14. 3d elements quality check

    All you need to perform quality check is to give threshold values then click on green buttons. example you want to check whether some solid elems have warpage >30 degree => input 30 into warpage field and then click "warpage" if some elements are > 30d warpage , they will be highlighted. click on "save failed" to save them enter panel F5, select entity as "elems" > click elems> retrieve> elems> reverse > mask failed elems will be isolated on screen and you can modified them,... Or do you mean you want to summary element quality values like below? elem1 warpage aspect minsize maxsize elem2 warpage aspect minsize maxsize ...
  15. Hi You can use HmMarkCol or HmListCol to activate graphic engine and then can pick nodes directly, plus using hm_framework to register a callback proc which acts on every click, this callback will take node id and make it blue, green, red by pass it to HmVectorCol set 1 n1 $nodeid
  16. Hi Can't you catch it by 'catch' command?
  17. hI To start learning tcl scripting in hm, enter menu Help > Altair Help Home . => Reference Guide => Hypermesh In Hypermesh Reference Guide, read section "Scripts" do some examples, and read some sample scripts in ~altair/14.0/hm/scripts
  18. Hello everybody I made a new function for Hypermesh to copy mesh among sessions Please announce me if any error. hmcp.zip - "Extract here" package hmcp.zip - copy folder hmcp to <AltairHome>/hm/scripts folder - start Hypermesh, it should shows an icon and provide some information like below: - You can copy elements selected in any current panel: - Once again, this topic is to introduce extensions for Hypermesh. I let updated version of hmdnd (drag and drop function) here tkdnd2.6.zip related post:
  19. You should define your own callback proc, which calls hm_getdirectionpanel HmVectorCol is just a sample callback , I think so
  20. You can apply force on hm entity type "surfs" , not only "elems", when exporting solver deck hm will map force on surfs to elems attached to those surfs You have to associate nodes of elems to the surfs (panel geom>node edit>associate), in order to map forces successfully
  21. Hi, retrieve them by callback proc, you are using HmVectorCol as callback proc, so maybe: set n1 [HmVectorCol get n1] set n2 [HmVectorCol get n2] ... please test it
  22. Looking for "Hyperworks GUI Toolkit" in reference help or in start>program>altair hyperworks>Tools You should use hwtk from version 14, instead of hwt
  23. Hi The function requests an interface item must be selected on data tree. Let's looking in tk tree selection command later
  24. If you did not see hmsettings.tcl or hmmenu.set files Click on menu View>Command Window then type in the command window below command: pwd it show current working directory, just copy it and paste to window explorer remember to quit hypermesh before deleting those 2 files
  25. And, if you just need to call it instead of pack it in your toplevel, simply use command set Vector [hm_getdirectionpanel]