在2014上运行,卡在了文字及线型颜色这里- (SETQ key5 (GETVAR "DIMASZ"))
- (if (setq obj (AddMLeaderStyle nam1))
- (progn (vla-put-textstyle obj "引线");文字样式
- (vla-put-textheight obj 3.5);文字高度
- (vla-put-arrowsize obj key5);箭头大小
- (vla-put-ArrowSymbol obj "_Dot" );箭头符号样式-圆点
- (vla-put-BreakSize obj 0.2);引线打断大小
- (vla-put-ContentType obj acMTextContent);引线类型-acBlockContent=块acMTextContent=多行文字acNoneContent =无
- (vla-put-DrawMLeaderOrderType obj acDrawLeaderTailFirst);acDrawLeaderTailFirst=文字优先acDrawLeaderHeadFirst=基线优先
- (vla-put-FirstSegmentAngleConstraint obj 4);第一段角度60度
- (vla-put-LandingGap obj 0.8);文字附着间隙
- ;(vla-put-LeaderLineColor obj acByLayer);引线颜色(值不正确)
- (vla-put-LeaderLinetype obj 1);引线线型
- (vla-put-LeaderLineWeight obj -1);引线宽度
- (vla-put-LeaderLineTypeId obj "ByLayer");引线类型iD
- (vla-put-MaxLeaderSegmentsPoints obj 2);最大引线点数
- ;(vla-put-OverwritePropChanged obj False);覆盖特性值True,False(说没这个参数)
- (vla-put-SecondSegmentAngleConstraint Property obj 6);第二段角度90度
- (vla-put-TextAlignmentType obj 0);文字对齐类型acCenterAlignment=中acLeftAlignment=左acRightAlignment=右
- (vla-put-TextAngleType obj 1);文字角度(这个值应该设置什么?)
- (vla-put-TextAttachmentDirection obj 0);文字附着方向acAttachmentHorizontal=水平acAttachmentVertical=垂直
- (vla-put-TextBottomAttachmentType obj 0);底部文字附着方向acAttachmentCenter=居中acAttachmentLinedCenter=下划线并居中
- ;(vla-put-TextColor obj acYellow);文字颜色(值不正确,但查询应该是这个值,不知为什么)
- (vla-put-TextLeftAttachmentType obj 7);左对齐位置文字连接位置类型
- (vla-put-TextRightAttachmentType obj 7);右对齐位置文字连接位置类型
- (vla-put-TextTopAttachmentType obj 0);顶部文字附着方向acAttachmentCenter=居中acAttachmentLinedCenter=下划线并居中
- (vla-put-ScaleFactor obj scal)
- (setvar "CMLEADERSTYLE" nam1)
- )
- )
通过设置了样式后,使用(vlax-dump-object (vla-item (vla-item (vlax-ename->vla-object (namedobjdict)) "ACAD_MLEADERSTYLE") "standard") t)
获取了特征码,如下:
; IAcadMLeaderStyle: AutoCAD 多重引线样式界面
;特性值:
; AlignSpace = 4.0
; Annotative = 0
; Application (RO) = #<VLA-OBJECT IAcadApplication 000000013fcfc910>
; ArrowSize = 1.0
; ArrowSymbol = "_Dot"
; BitFlags = 0
; Block = ""
; BlockColor = #<VLA-OBJECT IAcadAcCmColor 000000002c9fb3f0>
; BlockConnectionType = 0
; BlockRotation = 0.0
; BlockScale = 1.0
; BreakSize = 0.125
; ContentType = 2
; Description = "Standard"
; Document (RO) = #<VLA-OBJECT IAcadDocument 000000002c69af88>
; DoglegLength = 2.0
; DrawLeaderOrderType = 0
; DrawMLeaderOrderType = 1
; EnableBlockRotation = -1
; EnableBlockScale = -1
; EnableDogleg = -1
; EnableFrameText = 0
; EnableLanding = -1
; FirstSegmentAngleConstraint = 4
; Handle (RO) = "131"
; HasExtensionDictionary (RO) = 0
; LandingGap = 0.8
; LeaderLineColor = #<VLA-OBJECT IAcadAcCmColor 000000002c9fab50>
; LeaderLinetype = 1
; LeaderLineTypeId = "ByLayer"
; LeaderLineWeight = -1
; MaxLeaderSegmentsPoints = 2
; Name = "Standard"
; ObjectID (RO) = 43
; ObjectID32 (RO) = 43
; ObjectName (RO) = "AcDbMLeaderStyle"
; OverwritePropChanged (RO) = -1
; OwnerID (RO) = 44
; OwnerID32 (RO) = 44
; ScaleFactor = 20.0
; SecondSegmentAngleConstraint = 6
; TextAlignmentType = 0
; TextAngleType = 1
; TextAttachmentDirection = 0
; TextBottomAttachmentType = 0
; TextColor = #<VLA-OBJECT IAcadAcCmColor 000000002c9fb090>
; TextHeight = 4.0
; TextLeftAttachmentType = 7
; TextRightAttachmentType = 7
; TextString = ""
; TextStyle = "Standard"
; TextTopAttachmentType = 0
;支持的方法:
; Delete ()
; GetExtensionDictionary ()
; GetXData (3)
; SetXData (2)
其余的参数值能直接填写,但这个TextColor = #<VLA-OBJECT IAcadAcCmColor 000000002c9fb090>,不知道怎样使用,我需要字体颜色是2号色
|