Need help ~~~~
I Want to Creating Multileader Style using LISP ... but can't put attrib block to Mleaderstyle ......
code : '("ContentBlockName" "_iDgnMK_5Z_MK材料標註") has a problem
the source block can't use "_iDgnMK_5Z_MK材料標註" for my lisp
[img]
so I Need to find the right way
(defun make_mleader_style_MK
(mleaderstylename
/
adoc
mldrdict
newldrstyle
objcolor
)
(vl-load-com)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(setq mldrdict (vla-item (vla-get-dictionaries adoc) "ACAD_MLEADERSTYLE"))
(setq newldrstyle (vlax-invoke mldrdict 'addobject mleaderstylename "AcDbMLeaderStyle" ))
(foreach item
(list
'("AlignSpace" 4)
'("ArrowSize" 1.25)
'("BitFlags" 0)
'("BlockConnectionType" 1)
'("BlockRotation" 0.0)
'("BlockScale" 1.0)
'("BreakSize" 1.25)
'("ContentType" 1)
'("BlockConnectionType" 1)
'("ContentBlockType" 6)
'("ContentBlockName" "_iDgnMK_5Z_MK材料標註")
'("Description" "MK-Mleader Style Description")
'("DoglegLength" 5.0)
'("DrawLeaderOrderType" 0)
'("DrawMLeaderOrderType" 1)
'("EnableBlockRotation" -1)
'("EnableBlockScale" -1)
'("EnableDogleg" -1)
'("EnableFrameText" 0)
'("EnableLanding" -1)
'("FirstSegmentAngleConstraint" 0)
'("LandingGap" 0.9)
'("LeaderLineType" 1)
'("LeaderLineTypeId" "CENTER2")
'("LeaderLineWeight" -3)
'("MaxLeaderSegmentsPoints" 2)
'("ScaleFactor" 1.0)
'("SecondSegmentAngleConstraint" 0)
'("TextAlignmentType" 0)
'("TextAngleType" 0)
'("TextAttachmentDirection" 0)
'("TextBottomAttachmentType" 0)
'("TextHeight" 0.18)
'("TextLeftAttachmentType" 1)
'("TextRightAttachmentType" 1)
'("TextTopAttachmentType" 0)
)
(vlax-put newldrstyle (car item) (cadr item))
)
newldrstyle
)