Jump to content

Modify Existing MLeader/Multileader Style via LISP


Recommended Posts

Posted

What I am trying to accomplish can be done via the "Multileader Style Manager", but I am trying to do it without user input.

My current goal is to change arrowhead size to 1/8".

I have figured out how to change the arrowhead size of existing MLeaders, and how to change MLeaders over to an existing style (via vla-put-stylename), but neither of these update the definition of the existing style. That means newly created MLeaders will still have the old arrowhead size.

Thanks in advance!

 

 

Posted (edited)
(defun KGA_Sys_Apply (expr varLst / ret)
  (if (not (vl-catch-all-error-p (setq ret (vl-catch-all-apply expr varLst))))
    ret
  )
)

; (ChangeMleaderArrowSize "Standard" 6.0)
(defun ChangeMleaderArrowSize (nme size / dic mainDic stl)
  (setq mainDic (vla-get-dictionaries (vla-get-activedocument (vlax-get-acad-object))))
  (if
    (and
      (setq dic (KGA_Sys_Apply 'vla-item (list mainDic "ACAD_MLEADERSTYLE")))
      (setq stl (KGA_Sys_Apply 'vla-item (list dic nme)))
    )
    (progn
      (vla-put-arrowsize stl size)
      T
    )
  )
)

 

Edited by Roy_043
  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...