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

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 419
5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member
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: 419
    5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

    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