Jump to content
Sign in to follow this  

create cross section (Hypermesh 14) using tcl

Recommended Posts

Hey all,


I am trying to create several sections automatically with a tcl script. I have organized all of my parts into a Part Set, which  I would likey to use as the basis for the section. The concern that I have is that the only way I can get this to work is through the GUI which enacts the following command:


*setvalue crosssections id=6 VisualizationPart_ID={sets 3}


The remainder of the section definition works well as follows:


*setvalue crosssections id=8 name=boltk geometrytype=3 basenode={0 10 152.525} normal={0 0 1} Radius=1 PartSet_ID=1


The difficulty in using "VisualizationPart_ID" is that the given ID (sets 3 in this case) refers to the third set in the panel that pops up (also the thid set in the Sets Tree). I wont necessarily know how many sets are pre-existing in a given model, and therefore I need a means to pick the actual Set ID, which I can define myself previously in the script.


Has anyone had this issue before?


ANy workaround?





Share this post

Link to post
Share on other sites


when you have just created a set, catch its ID by:


#creating set named "My Set"

set MySetID [hm_latestentityid sets]; #=> ID of "My Set"


so when you assign it to crosssection, refer to MySetID instead of picking it:



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...