AddTolerance method example


Sub AddTolerance_Example()
' This example creates a tolerance object in model space.
    Dim toleranceObj As AcadTolerance
    Dim sBuf As String
    Dim insPt(0 To 2) As Double
    Dim dirVect(0 To 2) As Double
    ' Define the tolerance object
    sBuf = "{\Fgdt;t}%%v{\Fgdt;n}55{\Fgdt;s}%%v{\Fgdt;i}22{\Fgdt;m}%%v{\Fgdt;c}%%v%%v"
    insPt(0) = 10: insPt(1) = 10#: insPt(2) = 0#
    dirVect(0) = 1: dirVect(1) = 0: dirVect(2) = 0#
    ' Create the tolerance object in model space
    Set toleranceObj = ThisDrawing.ModelSpace.AddTolerance(sBuf, insPt, dirVect)
    toleranceObj.Update
    ThisDrawing.Application.ZoomExtents
End Sub

© Bricsys NV. All rights reserved.