Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy elements from one coordinate system to another coordinate system in FEMAP

Status
Not open for further replies.

modeldamper

Mechanical
Jan 21, 2014
26
Hi everyone.

It will be nice if you could help me out in copying elements from one coordinate system to another coordinate system in FEMAP.

Thanks
 
Replies continue below

Recommended for you

This might help, wrote it a while back. Launch it in the API window.

This macro will do the following:
1) ask you for a selection of elements you want to copy
Internally it will retrieve all nodes used by these elements​

2) ask you for the original CSys

3) As you for the destination CSys (selection, i.e. there can be several)
For of each of these, it will
1)create copies of the nodes by replicating their coordinates in that new Csys​
2) create copies of the elements by using these new nodes​

NB: this was created for "simple" elements like 1D, 2D, 3D and rigids. I don't use SlideLines often for example, the macro may not be robust for these more "exotic" elements.

APav
 
 http://files.engineering.com/getfile.aspx?folder=8d2ede15-03d9-4e3a-beeb-22e16db76a93&file=Create_Copies_in_CSys.BAS
APav, great script! Really.

I did find a problem with using it when it encountered node IDs that already existed. The script creates new nodes based on an offset, but if it finds one that already exists it assigns the next empty ID. But later on when it assigned nodes to the new elements it was still wanting to use the offset node ID instead of the femap assigned node ID. The only way I could figure out how to ensure the IDs matched was to create a dictionary object to keep track of the original IDs and the new IDs.

Script does the same thing, but seems to handle any overlapping of Node IDs.

Danny


 
 http://files.engineering.com/getfile.aspx?folder=50a8e172-ffbe-46e8-ae06-fbdc5ceb7c05&file=Create_Mesh_Copies_in_defined_CSys.BAS
Ok, forgot to correct the message that gets printed to the Message Window.
Line 109 should be: App.feAppMessage(FCM_NORMAL,"Created copies in Cys ID " & CStr(cs.ID))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor