Jump to content
jcd

Can't create entityset for a single node without assigning a property to it

Recommended Posts

Hello,

 

I was trying to create a node using,

*createnode 0 0 0 0 0 0;

and then assigning it to an entityset using,

*createmark nodes 1 [hm_latestentityid nodes];
*entitysetcreate "SetName" nodes 1;

 

However when I go check the created set in the HyperMesh Model GUI under Sets, it doesn't show any nodes added to it.

 

I'd appreciate any help with this issue.

 

Thanks.

Share this post


Link to post
Share on other sites
1 hour ago, Q.Nguyen-Dai said:

Your commands work without issue on my Hypermesh.

These commands work for me as well when I type them into the hm tcl console. However, when I use these commands in a script, the set that is created does not have any nodes.

 

However, if after creating the set and assigning the node to it, I assign a property to the node using tcl script, then the set seems to retain the node that I had assigned earlier.

 

I'm not really sure why this is happening.

Share this post


Link to post
Share on other sites
8 hours ago, jcd said:

These commands work for me as well when I type them into the hm tcl console. However, when I use these commands in a script, the set that is created does not have any nodes.

 

 

 

That means your script has bug

 

 

Actually, I don't know how to assign property to a node. If you have problem with your script then show it here. We will debug it easily

jcd likes this

Share this post


Link to post
Share on other sites
13 hours ago, tinh said:

 

That means your script has bug

 

 

Actually, I don't know how to assign property to a node. If you have problem with your script then show it here. We will debug it easi

@tinh : I think I realize where the issue is occuring in my script now. Having said that, I still don't have a fix for it.
 

To put it very simply, this is my script,

*createnode 0 0 0 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate OneNode nodes 1
*createnode 0 0 5 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate TwoNode nodes 1
*createnode 0 0 10 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate ThreeNode nodes 1
*nodecleartempmark

When I run this script, the three sets, "OneNode","TwoNode" and "ThreeNode" do get created, however only the "ThreeNode" entity set has a node in it. The other two sets have 0 nodes in them. I figured out that due to the use of *nodecleartempmark, only the most recently created node is left which is why ThreeNode has a node in it.

 

However, my question is that how should I make all three sets retain their nodes and not just the last one.

 

 

Share this post


Link to post
Share on other sites

The following code works for me:

*createnode 0 0 0 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate OneNode nodes 1
*clearmark nodes 1

*createnode 0 0 5 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate TwoNode nodes 1
*clearmark nodes 1

*createnode 0 0 10 0 0 0
*createmark nodes 1 [hm_latestentityid nodes]
*entitysetcreate ThreeNode nodes 1
*clearmark nodes 1

 

mode_set.png

jcd likes this

Share this post


Link to post
Share on other sites

@Q.Nguyen-Dai : Yes, my code does work without the *nodecleartempmark statement as well, however I do need to clear the temporary nodes at the end of my program, and if I do so, the added nodes disappear from two of the three entitysets. So my question is how can I make the entity sets retain the added nodes even after *nodecleartempmark is used ?

Share this post


Link to post
Share on other sites
17 minutes ago, Q.Nguyen-Dai said:

You can't. Because Hypermesh does not keep "temporary" nodes after   "*nodecleartempmark" command.

To keep these nodes, you can creat some lines based on these nodes, or some element?

@Q.Nguyen-Dai : The issue is that I only have to keep these nodes as RefNodes (kind of a point node to represent an entire mass) which is why I cannot create lines or elements with these Nodes as they serve as reference nodes. Hence, I was looking for a solution by which I could convert these temporary nodes to permanent ones so that they remain stored in the entity set.

Share this post


Link to post
Share on other sites
13 hours ago, jcd said:

@Q.Nguyen-Dai : The issue is that I only have to keep these nodes as RefNodes (kind of a point node to represent an entire mass) which is why I cannot create lines or elements with these Nodes as they serve as reference nodes. Hence, I was looking for a solution by which I could convert these temporary nodes to permanent ones so that they remain stored in the entity set.

 

 

If you need a node represents lumped mass, create mass element on it

Share this post


Link to post
Share on other sites
10 hours ago, tinh said:

 

 

If you need a node represents lumped mass, create mass element on it

@tinh : Thank you for that suggestion. It worked perfectly. Just as a side note, I was able to find another hypermesh command called *makepreservednodes which also does the same thing, converts a list of temporary nodes on a mark to preserved nodes which are retained even after using *nodecleartempmark.

tinh likes this

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.

Guest
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.


×
×
  • Create New...