How to automate creation of an aligned coordinate system to vector principal stress at a node in Wor
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
in Structures
How to automate creation of an aligned coordinate system to vector principal stress at a node in Workbench Mechanical?
Tagged:
0
Answers
-
The following code can be adapted. Note - the script uses InternalObject, which is an undocumented and unsupported command. There is no guarantee that the script will work, or that it will work for all versions.
vector_stress=Model.Analyses[0].Solution.AddVectorPrincipalStress() vector_stress.EvaluateAllResults() sel = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.MeshNodes) sel.Ids=[354] #known NodeId ExtAPI.SelectionManager.AddSelection(sel) csys = Model.CoordinateSystems.AddCoordinateSystem() ExtAPI.SelectionManager.AddSelection(sel) vector_stress.InternalObject.alignCoordinateSystem(ExtAPI.SelectionManager.InternalObject,csys.ObjectId)
0