- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @johnster100. As you might have noticed, the GeometricConstraint object is a generic base class for a whole bunch of other more specific types of geometric constraint objects (CoincidentConstraint, CollinearConstraint, ConcentricConstraint, etc, etc.). Not all types of geometric constraints have that 'EntityOne' property, so that may be the main problem. It is likely encountering a constraint that does not have that 'EntityOne' property, so that line of code fails. Plus, what if the line is actually the value of the 'EntityTwo' property of one of the ones that has that property, instead of its 'EntityOne' property. Your code will likely have to filter for what more specific Type of constraint it is first, then use the appropriate property check that would work on that type of constraint object.
Wesley Crihfield
(Not an Autodesk Employee)