Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have lisp code that allows me to create an mleader style, I found it in the forums and it contained a list of options like textheight, scale, etc...
(defun CreateMLeaderStyle (dwg_scale / CMS_MLeaderStyles CMS_NewMLeaderStyle CMS_ColorObject)
(setq newMlStyleName "Amkor")
(if (tblsearch "STYLE" "ROMANS")
(progn
(setq CMS_MLeaderStyles (vla-item (vla-get-Dictionaries (vla-get-ActiveDocument (vlax-get-acad-object))) "ACAD_MLEADERSTYLE"))
(if (vl-catch-all-error-p (vl-catch-all-apply 'vla-item (list CMS_MLeaderStyles newMlStyleName)))
(progn
(setq CMS_NewMLeaderStyle (vla-AddObject CMS_MLeaderStyles newMlStyleName "AcDbMLeaderStyle"))
;(vla-put-ColorIndex CMS_NewMLeaderStyle 256) ;color = bylayer
;(vla-put-ArrowSymbol
(vla-put-ArrowSize CMS_NewMLeaderStyle 4.40)
(vla-put-MaxLeaderSegmentsPoints CMS_NewMLeaderStyle 2)
;(vla-put-EnableDogleg
(vla-put-DogLegLength CMS_NewMLeaderStyle 5.0) ;Landing length
(vla-put-ScaleFactor CMS_NewMLeaderStyle dwg_scale)
(vla-put-TextStyle CMS_NewMLeaderStyle "ROMANS")
(vla-put-TextAngleType CMS_NewMLeaderStyle 1)
;(vla-put-TextColor CMS_NewMLeaderStyle 256)
(vla-put-TextHeight CMS_NewMLeaderStyle 2.20)
(vla-put-TextLeftAttachmentType CMS_NewMLeaderStyle 1) ;Middle
(vla-put-TextRightAttachmentType CMS_NewMLeaderStyle 1) ;Middle
(vla-put-LandingGap CMS_NewMLeaderStyle 0.125)
;(vla-put-ExtendLandToText
)
(princ "\n ** Error: MLeader style already exists")
)
)
(princ "\n ** Error: textstyle does not exist")
)
(princ)
)
I have a few questions:
1. How do I set the General "Color" setting to "Bylayer"?
2. How do I set the ArrowSymbol to "Closed-Filled"?
3. How do I enable "Automatically include landing"?
4. How do I turn off "Extend leader to text"?
Thanks,
Mark
Solved! Go to Solution.