How do you know to what EntityObject refers Dimensions?

Dec 11, 2016 at 3:00 PM
Hello, Daniel. Thank you for your great work.
I'm just starting to work with dxf, please answer my question:
How do you know to what EntityObject refers Dimensions? Thank you.
Coordinator
Dec 12, 2016 at 5:10 PM
The seven dimension classes AlignedDimension, LinearDimension, DiametricDimension, RadialDimension, Angular2LineDimension, Angular3PointDimension, and OrdinateDimension inherits from the Dimension class which also inherits from EntityObject; therefore you can use the operator as or is to check it before casting to its specific class. Additionally the EntityObjects contains a property called "Type" that will return which kind of entity it is. The Dimension class also has the property "DimensionType" that returns a DimensionType enum that specifies the kind of Dimension.

In this previous post you will find an example on how to do it. Choose the method you prefer.

Daniel