How to change Length Units in Geometry object of DataModel Tree?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 389
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How to change Length Units in Geometry object of DataModel Tree?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 389
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓

    enter image description here

    Manually set the unit first, retrieve the internal value of the property CADUnits and then use it in the Automation script. Not a very good solution, if anyone has better ideas please share:

    For example - mm:

    ExtAPI.DataModel.Project.Model.Geometry.PropertyByName('CADUnits').InternalValue=2