Jump to content


  • Content Count

  • Joined

  • Last visited

About creakesiv

  • Rank

Profile Information

  • Country
    United States
  • Are you University user?
  1. Hi, I am geting a "invalid command name" error when running the following script. It works fine if I take the procedure away and just run the script stand alone. This script is intended to create a vector at a node from geoms, split into components and name them based on x,y,z (havent added this last part yet). Any help is appreciated. Thank you, -Clay Tcl script error (Tcl/Tk Script) : invalid command name "vector_geoms" while executing "vector_geoms $entyp $n $en $l" invoked from within "set test [vector_geoms $entyp $n $en $l]" (file "C:/Users/clay.reakes/Documents/default working directory/coding/tools/vctr_gms-test.tcl" line 9) invoked from within "source {C:/Users/clay.reakes/Documents/default working directory/coding/tools/vctr_gms-test.tcl}" ("uplevel" body line 1) invoked from within "# Compiled -- no source code available error "called a copy of a compiled script"" (procedure "::hw::RunTclTkScpt" line 1) invoked from within "::hw::RunTclTkScpt 222" *createmarkpanel nodes 1 "select node" set n [hm_getmark nodes 1] *createmarkpanel surf 1 "select surf" set en [hm_getmark surf 1] set entyp "surf" set l "test" set test [vector_geoms $entyp $n $en $l] proc vector_geoms {entyp n en l} { *createmark $entyp 1 $en *createmark nodes 1 $n *geomvectorcreate $entyp 1 1 -1 1 0 0 *createmark vector 1 -1 set $l [hm_getmark vector 1] set name $ append name $l puts [subst $$name] foreach a [Iist x y z] { set l_ $l append l_ _ append l_ $a set cmp $a append cmp comp set $l_ [hm_getentityvalue vector [subst $$name] \"$cmp\" 0] puts $l_ } } (had to replace l in list with an i because of forum formatting)
  2. Figured out a method that is a little more complicated on the user end, but works fine. Use the "Length" command to get length of line Calculate percentage of that line = to 10mm of length Create nodes using "Extract Parametric" Change upper and lower bound to represent the calculated percentages for the 10mm displacement
  3. Is there a way to move a temp node along the line it was created from? What I am looking to do is create a node at each end of a curved line, then bring those nodes in 10mm along that curved line. Thank you, -Clay
  4. Hi, I am currently working on creating a macro just to learn the process. I want this macro to check the components and see if a component labeled "^2D" exists. If it does not, I want the macro to create this component. The macro will then move all 2D quad and tria elements to this collector. The reason for this is I like to save my 2D mesh in a collector that I can turn export off before output to a .inp. I have used this code to verify that I am able to create the collector and move the elements: *beginmacro("Move2D") *createentity(comps,name=^2D) *createmark(element,1) "by config" tria3, tria6, quad4, quad8 *movemark(elements,1,"^2D") *endmacro() However I am having trouble when attempting to do a loop check. I am 99% sure that my formatting for Tcl is completely wrong (I just began learning the code yesterday). When attempting to load the userpage.mac hyperworks freezes with the code how it is. *beginmacro("Move2D") set exists "False" set entitylist (hm_entitylist comps name) foreach title $entitylist { if {$title == "^2D"} { set exists "True" return } if {$exists == "True"} { *createentity(comps,name=^2D) } *createmark(element,1) "by config" tria3, tria6, quad4, quad8 *movemark(elements,1,"^2D") } *endmacro() Thank you in advance for any help, -Clay
  • Create New...