How can I promote imported connections to remote points in Mechanical?
Jimmy He
Member, Employee Posts: 24
✭✭✭✭
in Structures
I have a model with many imported connections (read from an external FE input file), how can I edit them and promote them to remote points in Mechanical via scripting?
Tagged:
0
Comments
-
There can be two types of connections: rigid (RBE2) and deformable (RBE3), the APIs to edit and promote them to remote point are slightly different.
For rigid connections, the table in Mechanical looks like the following:
To edit the reference node ID and promote to remote point, one can use the following:
# Rigid connectors obj = DataModel.GetObjectsByName('Rigid Remote Connectors(External Model)')[0] n_rows = obj.Count for r in range( 1,n_rows+1 ): row = obj.GetObject(r) # Modify reference node ID row.SetPropertyValue('ReferenceNodeId',1) # Promote to remote point obj.Promote([r],1)
For deformable connections, the table in Mechanical looks like this:
To edit the reference node ID and promote to remote point, one can use the following:
# Deformable connectors obj = DataModel.GetObjectsByName('Flexible Remote Connectors(External Model)')[0] n_rows = obj.Count for i , row in enumerate( obj ): # Modify reference node row.SetPropertyValue('ReferenceNode',1) # Promote to remote point obj.Promote([i+1],1)
Note the slight differences in the property name and syntax in both cases.
0