Quantcast
Channel: From the Trenches with Autodesk Inventor
Viewing all articles
Browse latest Browse all 61

iLogic: Select and Set Sketch Dimension Tolerances

$
0
0

 

Issue:
You want to to quickly select and set standard tolerances for your sketch dimensions.


Solution:
Here is a quick routine written for iLogic using the API to do this. This employs the CommandManager's Pick function to allow you to select individual dimensions and set the tolerance.

Thank you! to Ron Moore, for the question/post idea.


oMsg = "Select sketch dimensions to apply default tolerance (Press Esc to continue)"

WhileTrue

        DimoDimensionAsDimensionConstraint

        oDimension= ThisApplication.CommandManager.Pick(

        SelectionFilterEnum.kSketchDimConstraintFilter, oMsg) 

        ' If nothing gets selected then we're done   

        IfIsNothing(oDimension) ThenExitWhile 

        oDimension.Parameter.Tolerance.SetToSymmetric(0.05)

EndWhile



Viewing all articles
Browse latest Browse all 61

Trending Articles