Ansys Mechanical Scrpting (Python): How to set direction of directional shear force?
Hello,
I am trying to create a beam result for a directional shear force (in y- & z-axis). But this options seems not to exist as a method (at least I can't find it in the API Reference Guide). For directional bending moments, it is easily possible:
yMoment = mySolution.AddDirectionalBendingMoment()
yMoment.NormalOrientation = NormalOrientationType.YAxis
How is it possible for the shear force? (And how to insert proper code representation in this forum?)
Thanks in advance!
Best Answer
-
Hi @JW ,
You can use the following lines of code to insert a directional shear force:
solution = ExtAPI.DataModel.Project.Model.Analyses[0].Solution new_res = solution.AddTotalShearForce() new_res.BeamResultType = TotalOrDirectional.Directional
However, setting the "Orientation" of this result is not officialy exposed in the automation API (I will report this to our development team):
As a workaround, you can use the unsupported commands below. By unsupported, we mean that they are not documented, and we do not guarantee that they will work.
new_res.InternalObject.NormalOrientation = NormalOrientationType.ZAxis
For using the forum text's editor, please refer to this post: https://discuss.ansys.com/discussion/1887/how-do-i-use-the-text-editor
I hope this helps.
0
Answers
-
thank you for your detailed answer! This helped me a lot.
1