幾何公差図形を作成します。
サポートされているプラットフォーム: Windows のみ
VBA:
RetVal = object.AddTolerance(Text, InsertionPoint, Direction)
タイプ: Block、ModelSpace、PaperSpace
このメソッドが適用されるオブジェクト。
アクセス: 入力のみ
タイプ: 文字列
幾何公差の文字列。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
幾何公差記号を配置する位置を指定する図面内の 3D WCS 座標。
アクセス: 入力のみ
タイプ: バリアント型(3 要素の倍精度浮動小数点数型配列)
幾何公差記号の方向を指定する、3D 方向ベクトル。
追加の注意はありません。
VBA:
Sub Example_AddTolerance()
' This example creates a tolerance object in model space.
Dim toleranceObj As AcadTolerance
Dim textString As String
Dim insertionPoint(0 To 2) As Double
Dim direction(0 To 2) As Double
' Define the tolerance object
textString = "{\Fgdt;r}%%vasdf{\Fgdt;l}%%vdf%%vxc%%v12{\Fgdt;m}%%vsd" & vbCrLf & _
"{\Fgdt;t}%%vdfd%%v3dd{\Fgdt;l}%%vv%%v%%vxc{\Fgdt;m}" & vbCrLf & _
"123"
insertionPoint(0) = 5#: insertionPoint(1) = 5#: insertionPoint(2) = 0#
direction(0) = 1#: direction(1) = 1#: direction(2) = 0#
' Create the tolerance object in model space
Set toleranceObj = ThisDrawing.ModelSpace.AddTolerance(textString, insertionPoint, direction)
ZoomAll
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AddTolerance()
;; This example creates a tolerance object in model space.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Define the tolerance object
(setq insertionPoint (vlax-3d-point 5 5 0)
direction (vlax-3d-point 1 0 0))
;;"{\Fgdt;r}%%vasdf{\Fgdt;l}%%vdf%%vxc%%v12{\Fgdt;m}%%vsd"
(setq textString (strcat "{\\Fgdt;r}%%vasdf{\\Fgdt;l}%%vdf%%vxc%%v12{\\Fgdt;m}%%vsd\n"
"{\\Fgdt;t}%%vdfd%%v3dd{\\Fgdt;l}%%vv%%v%%vxc{\\Fgdt;m}\n"
"123"
)
)
;; Create the tolerance object in model space
(setq modelSpace (vla-get-ModelSpace doc))
(setq toleranceObj (vla-AddTolerance modelSpace textString insertionPoint direction))
(vla-ZoomAll acadObj)
)