Issues with changing the coordinate system in a "user define results" plot.

Kev
Kev Member Posts: 41
10 Comments First Anniversary 5 Likes Name Dropper
**

Hi guys :)

I am looking into changing the CoordinateSystem field of a User defined plot in a script from "Global coordinate system" to "Solution Coordinate System" but have hit a wall. The macro recorder does not record any changes and the Plot.CoordinateSystem parameter can only accept objects of type coordinate system! How can I find a quick way for this change?

Any help in this regard will be much appreciated :)


Best Answer

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 871
    100 Answers 500 Comments 250 Likes First Anniversary
    ✭✭✭✭
    Answer ✓

    Hi @Kev , this is not intuitive, but if you set the CS to "None", you'll get the Solution CS:

    normal_stress = DataModel.GetObjectsByType(Ansys.ACT.Automation.Mechanical.Results.StressResults.NormalStress)[0]
    normal_stress.CoordinateSystem = None
    

Answers

  • Kev
    Kev Member Posts: 41
    10 Comments First Anniversary 5 Likes Name Dropper
    **

    Hi @Pernelle Marone-Hitz . Thanks again for your prompt help!

    I should have known it was something along those lines as when I assigned the plot.CoordinateSystem to a variable and queried different attributes I'd get an error like " NoneType object has no attribute .... " .

    Thanks a million again Prenelle :)