指定引线、菜单组、弹出菜单项、工具栏项、折线或多边形网格对象的类型。 支持的平台:仅窗口 属性值 - 3D奥利线只读:不 类型:枚举ac3DPolylineType
物业价值 - 领导者只读:不 类型:枚举acLeaderType
属性值 - 菜单组只读:是的 类型:枚举acMenuGroupType
属性值 - 多边形网格只读:不 类型:枚举acPolymeshType
属性值 - 折线只读:不 类型:枚举acPolylineType
属性值 - 弹出菜单项只读:是的 类型:枚举acMenuItemType
Property Value - ToolbarItemRead-only: Yes Type: enum acToolbarItemType
RemarksPolygonMesh: If the type is set to then the M and N vertex count values will be used for vertex row column sizes. For any other type, the M and N density values will be used as the row and column sizes. PolygonMeshacSimpleMeshPolygonMesh ExamplesVBA: 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.") ))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:39
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.