tcl programme for node move


hello
I am working on tcl programme which will move selected node
in a vector defined by selecting nodes
I have written programme for that put node is not moving in direction I wanted
have look at programme
and how clearmark command works??


so finally I have found solution for this problem
*createmarkpanel nodes 1 'select node'
set node_list [hm_getmark nodes 1 ]
if {[llength $node_list] == 0} {
hm_errormessage 'no'
return
}
#*clearmark nodes 1
*createlistpanel nodes 2 'Select direction by node1->node2'
set vectnodelist [hm_getlist nodes 2]set nodeid1 [hm_getentityvalue nodes [lindex $vectnodelist 0] 'id' 0];
set nodeid2 [hm_getentityvalue nodes [lindex $vectnodelist 1] 'id' 0];
foreach {tot x y z} [hm_getdistance nodes $nodeid1 $nodeid2 0] {
*createvector 1 $x $y $zset elemsize [hm_getfloat 'elemsize' 'Enter elem size']
*translatemark nodes 1 1 $elemsize
}*clearmark nodes 1
Thank you everyone on forum
I have made this based on previous post only
thank you


thank you tinh
I will work on that
I want to write a program where while midsurfacing hm should capture the thickness of plate and auto assign it afterwards ???


thanks for that I will try that option
I want to cycle a particular tcl until I say to stop it
so how can I do it
like cycling particular command e.g. like program for translate and split it should continue to repeat same commands until I stop it
??


while 1 {
*createmarkpanel nodes 1 'select node'
set node_list [hm_getmark nodes 1 ]
if {[llength $node_list] == 0} {
hm_errormessage 'no'
return
}
#*clearmark nodes 1
*createlistpanel nodes 2 'Select direction by node1->node2'
set vectnodelist [hm_getlist nodes 2]
set nodeid1 [hm_getentityvalue nodes [lindex $vectnodelist 0] 'id' 0];
set nodeid2 [hm_getentityvalue nodes [lindex $vectnodelist 1] 'id' 0];
foreach {tot x y z} [hm_getdistance nodes $nodeid1 $nodeid2 0] {
*createvector 1 $x $y $z
#set elemsize [hm_getfloat 'elemsize' 'Enter elem size']
*translatemark nodes 1 1 0.196
}
*clearmark nodes 1
hm_setpanelproc {hm_callpanel 'edit element';}
return
}
so this is my program
at the end there is a call panel so I think because of that its not working
after I split when I press return it should return to '*createmarkpanel nodes 1 'select node''
so????


I tried it without return command but
when I press return command on the edit element panel it wont return to first command
so??


So is there any other way to call up that panel and continue the while loop??
so how can I do this whole process other way with while loop??
Or at least tell how to create a button on user tab I followed tut but I am not able to create it??
I think it is not possible to call hm panels in a loop as you expect
So try redefining your problem
Your button had wrong constructor:
*createbutton(5,'SURFACETRIM',00,5,GRAY,'Launch the succsesful.tcl script','EvalTcl','succsesful.tcl')
should be
*createbutton(5,'SURFACETRIM',0,0,5,GRAY,'Launch the succsesful.tcl script','EvalTcl','succsesful.tcl')


sorry for wrong file
I already have corrected that mistake
Your button had wrong constructor:
*createbutton(5,'SURFACETRIM',00,5,GRAY,'Launch the succsesful.tcl script','EvalTcl','succsesful.tcl')
still its not working?? I am win7 user and I have located this userpage.mac panel in DOCUENTS FOLDER


Thank you
That worked I was placing it in wrong directory
now it works fine
Thank you very much
hello
so I continue working on my script
So I think error lies in the *createvector comand I am not able to provide proper x and y component for the vector creation
So am I right??