How can I create a coordinate system and modify its type through scripting?

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 734
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

How can I create a coordinate system and modify its type through scripting?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 734
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓

    Below is an example of creating a cylindrical coordinate system:

        # create coordinate system:
        CS = ExtAPI.DataModel.Project.Model.CoordinateSystems.AddCoordinateSystem() 
        # modify CS name
        CS.Name="New CS"
        # change CS type
        CS.CoordinateSystemType=CoordinateSystemTypeEnum.Cylindrical