Leader、MenuGroup、PopupMenuItem、ToolbarItem、Polyline、または PolygonMesh オブジェクトのタイプを指定します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.Type
タイプ: 3DPolyline、Leader、MenuGroup、PolygonMesh、Polyline、PopupMenuItem、ToolbarItem
このプロパティが適用されるオブジェクト。
読み込み専用: いいえ
タイプ: ac3DPolylineType 列挙型
読み込み専用: いいえ
タイプ: AcLeaderType 列挙型
読み込み専用: はい
タイプ: acMenuGroupType 列挙型
読み込み専用: いいえ
タイプ: acPolymeshType 列挙型
読み込み専用: いいえ
タイプ: acPolylineType 列挙型
読み込み専用: はい
タイプ: acMenuItemType 列挙型
読み込み専用: はい
タイプ: acToolbarItemType 列挙型
PolygonMesh: PolygonMesh タイプが acSimpleMesh の場合は、頂点の行と列サイズに M と N の頂点の数値が使用されます。その他の PolygonMesh タイプの場合は、行と列のサイズに M と N の密度値が使用されます。
VBA:
Sub Example_Type() ' This example creates a leader in model space. ' It then changes the type of the leader. Dim leaderObj As AcadLeader Dim points(0 To 8) As Double Dim leaderType As Integer Dim annotationObject As AcadEntity points(0) = 0: points(1) = 2: points(2) = 0 points(3) = 4: points(4) = 4: points(5) = 0 points(6) = 4: points(7) = 2: points(8) = 0 leaderType = acLineNoArrow Set annotationObject = Nothing ' Create the leader object in model space Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType) ZoomAll ' Find the current leader type leaderType = leaderObj.Type MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example" ' Change the leader type leaderObj.Type = acLineWithArrow leaderObj.Update MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example" ' Change the leader type leaderObj.Type = acSplineNoArrow leaderObj.Update MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example" ' Change the leader type leaderObj.Type = acSplineWithArrow leaderObj.Update MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_Type() ;; This example creates a leader in model space. ;; It then changes the type of the leader. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq modelSpace (vla-get-ModelSpace doc)) (setq points (vlax-make-safearray vlax-vbDouble '(0 . 8))) (vlax-safearray-fill points '(0 2 0 4 4 0 4 2 0 ) ) (setq leaderType acLineNoArrow) (setq point (vlax-3d-point 4 2 0)) (setq annotationObject (vla-AddMText modelSpace point 1 "")) ;; Create the leader object in model space (setq leaderObj (vla-AddLeader modelSpace points annotationObject leaderType)) ;; Remove the temporary annotaion object and adjust the last coordinate of the leader (vla-Erase annotationObject) (vla-put-Coordinate leaderObj 2 (vlax-3D-point 4 2 0)) (vla-ZoomAll acadObj) ;; Find the current leader type (setq leaderType (vla-get-Type leaderObj)) (alert (strcat "The leader type is " (cond ((= leaderType acLineNoArrow) "acLineNoArrow.") ((= leaderType acSplineNoArrow) "acSplineNoArrow.") ((= leaderType acLineWithArrow) "acLineWithArrow.") ((= leaderType acSplineWithArrow) "acSplineWithArrow.") ))) ;; Change the leader type (vla-put-Type leaderObj acLineWithArrow) (vla-Update leaderObj) (setq leaderType (vla-get-Type leaderObj)) (alert (strcat "The leader type is " (cond ((= leaderType acLineNoArrow) "acLineNoArrow.") ((= leaderType acSplineNoArrow) "acSplineNoArrow.") ((= leaderType acLineWithArrow) "acLineWithArrow.") ((= leaderType acSplineWithArrow) "acSplineWithArrow.") ))) ;; Change the leader type (vla-put-Type leaderObj acSplineNoArrow) (vla-Update leaderObj) (setq leaderType (vla-get-Type leaderObj)) (alert (strcat "The leader type is " (cond ((= leaderType acLineNoArrow) "acLineNoArrow.") ((= leaderType acSplineNoArrow) "acSplineNoArrow.") ((= leaderType acLineWithArrow) "acLineWithArrow.") ((= leaderType acSplineWithArrow) "acSplineWithArrow.") ))) ;; Change the leader type (vla-put-Type leaderObj acSplineWithArrow) (vla-Update leaderObj) (setq leaderType (vla-get-Type leaderObj)) (alert (strcat "The leader type is " (cond ((= leaderType acLineNoArrow) "acLineNoArrow.") ((= leaderType acSplineNoArrow) "acSplineNoArrow.") ((= leaderType acLineWithArrow) "acLineWithArrow.") ((= leaderType acSplineWithArrow) "acSplineWithArrow.") ))) )