Automatic drafting project

Automatic drafting project

philippe_larouche8LWMF
Community Visitor Community Visitor
197 Views
1 Reply
Message 1 of 2

Automatic drafting project

philippe_larouche8LWMF
Community Visitor
Community Visitor

In Inventor 2026, how do I programmatically create an ordinate dimension set? OrdinateDimensions.Add fails with E_FAIL. I can read existing ordinate dimensions (DimensionType = 60163) but cannot create new ones. What is the correct API call?

0 Likes
198 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @philippe_larouche8LWMF.  It looks like you are looking at the wrong collection object.  I believe you would need to use the OrdinateDimensionSets.Add Method, instead of the OrdinateDimensions.Add method.  Both collection objects originate from the same common origin...the DrawingDimensions collection object.  The one route lets you create a whole 'set' at once, so that they are all associated with each other.  The other route is for creating individual ones that are not necessarily part of a 'set'.  When placing individual ordinate dimensions, you must have already defined an 'origin point' (OriginIndicator - DrawingView.OriginIndicator) in that view for the individual ordinate dimensions to reference their dimensions from.  If that origin point does not exist yet, it will throw an error.  I pretty much always use 'sets' instead of individual ones because of that myself.

DrawingDimensions.OrdinateDimensionSets 

DrawingDimensions.OrdinateDimensions 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)