SketchDimension Does Not Work

SketchDimension Does Not Work

tperam
Advocate Advocate
2,286 Views
21 Replies
Message 1 of 22

SketchDimension Does Not Work

tperam
Advocate
Advocate

 

Hi,
    SketchDimension in the following C++ Sample Program: Programming Interface Sample Programs Modeling Sketches Create sketch lines in various ways,

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-98e163be-fd07-11e4-9c39-3417ebd3d5be

does not work.

 

I copied the whole program in the sample.

Please help.
Thurai

////////////////////////////////////////
Ptr<SketchDimensions> sketchDimensions = sketch->sketchDimensions();
if(!sketchDimensions)
return false;
Ptr<SketchDimension> sketchDimension = sketchDimensions->addDistanceDimension(recLines->item(0)->startSketchPoint(), recLines->item(0)->endSketchPoint(), HorizontalDimensionOrientation, Point3D::create(5.5, -1, 0));
if(!sketchDimension)
return false;

////////////////////////////////////////

0 Likes
Accepted solutions (3)
2,287 Views
21 Replies
Replies (21)
Message 21 of 22

BrianEkins
Mentor
Mentor
Accepted solution

I think we misunderstood where you were seeing the problem.  The default behavior is that sketch dimensions are only displayed when the sketch is being edited.  You can override this by using the "Show Dimension" switch for the sketch. In the API you can control this switch by using the Sketch.areDimensionsShown property and set it to True.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 22 of 22

tperam
Advocate
Advocate

Thanks Brian.

 

Thurai

0 Likes