How to add dimensions to model to retrieve them in the drawing

How to add dimensions to model to retrieve them in the drawing

Anonymous
Not applicable
450 Views
1 Reply
Message 1 of 2

How to add dimensions to model to retrieve them in the drawing

Anonymous
Not applicable

I have been reading here that the preferred mode of generating dimensions on the drawing views is by using "Retrieve" method. My question is: how can I programatically add dimensions or measurements to the model so I can retrieve them in the drawing view? This has to be all done by code.

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

YuhanZhang
Autodesk
Autodesk

The model dimensions that can be retrieved in drawing are sketch DimensionConstraint/DimensionConstraint3D, and FeatureDimension. To add the sketch DimensionConstraint/DimensionConstraint3D you can use PlanarSketch.DimensionConstraints.Addxxx and Sketch3D.DimensionConstraints3D.Addxxx, and for feature dimensions they will be created when you create a feature. But not all the dimensions can be retrieved into a drawing view, you can use the GetRetrievableDimensions to check if a dimension can be retrieved into a drawing view. Hope this clears.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes