TCL hypermesh for begineers

#TCL for hypermesh #TCL hypermesh #Automation

Tcl or tool command language is a tool language that can be use to make several hypermesh process automated, I am assuming you understand basic coding and hypermesh. lets see some scripts given below and try to figure out the use of different syntex

When we start hyperworks and start doing several operations a file command.tcl is automatically created having all the codes written for all operations we are doing.

#command.tcl after creating a simple sphere


*drawlistresetstyle

*createnode 0 0 0 0 0 0

*surfacemode 4

*surfacespherefull 520 10

  1. Comment- #text

puts “hello_World”

*createmark comp 1 all
set compIds [hm_getmark comp 1]
foreach compId $compIds {
set compname [hm_getvalue comp id =$compId dataname=name]
puts $compname

*createmark comp 1 all
set compIds [hm_getmark comp 1]
foreach compId $compIds {
set compname [hm_getvalue comp id =$compId dataname=name]
*createmark elem 1 $compId
set noofelem [hm_marklength elem 1]
puts $compname\t$noofelem

for {set x 0} {$x < 10} {incr x} {*createnode $x 0 0 0 0 0}