- Sub Example_AddTolerance()
-
- Dim toleranceObj As AcadTolerance
- Dim textString As String
- Dim insertionPoint(0 To 2) As Double
- Dim direction(0 To 2) As Double
-
- textString = "{\Fgdt;j}%%v位置度-j" & vbCrLf & _
- "{\Fgdt;r}%%v同轴度-r" & vbCrLf & _
- "{\Fgdt;i}%%v对称度-i" & vbCrLf & _
- "{\Fgdt;f}%%v平行度-f" & vbCrLf & _
- "{\Fgdt;b}%%v垂直度-b" & vbCrLf & _
- "{\Fgdt;a}%%v倾斜度-a" & vbCrLf & _
- "{\Fgdt;g}%%v圆柱度-g" & vbCrLf & _
- "{\Fgdt;c}%%v平面度-c" & vbCrLf & _
- "{\Fgdt;e}%%v圆度-e" & vbCrLf & _
- "{\Fgdt;u}%%v直线度-u" & vbCrLf & _
- "{\Fgdt;d}%%v面轮廓度-d" & vbCrLf & _
- "{\Fgdt;k}%%v线轮廓度-k" & vbCrLf & _
- "{\Fgdt;h}%%v圆跳动度-h" & vbCrLf & _
- "{\Fgdt;t}%%v全跳动度-t" & vbCrLf & _
- "{\Fgdt;l}%%vl" & vbCrLf & _
- "{\Fgdt;m}%%vm" & vbCrLf
- insertionPoint(0) = 5#: insertionPoint(1) = 5#: insertionPoint(2) = 0#
- direction(0) = 1#: direction(1) = 0#: direction(2) = 0#
-
- Set toleranceObj = ThisDrawing.ModelSpace.AddTolerance(textString, insertionPoint, direction)
- ZoomAll
-
- End Sub
|