TheSwamp

CAD Forums => CAD General => Topic started by: Dave M on May 17, 2017, 12:57:18 PM

Title: Import/Reset Multileader Styles
Post by: Dave M on May 17, 2017, 12:57:18 PM
Hi All,


I have a set of plans with about 100 sheets, and I would like to update a multileader style that resides in each file.  Does anyone know of a way to import a multileader style from another file that will override the existing style?  The only workaround I can think of is to rename the style I want to change, import the style I want to use it into the sheet, and then swap the style of the multileaders and purge the style I no longer need.


Anyone know of a better way to do this?


Thanks
Title: Re: Import/Reset Multileader Styles
Post by: ronjonp on May 17, 2017, 01:18:26 PM
You could use something like this to get the mleaderstyle . .then make the changes programmatically.

Code - Auto/Visual Lisp: [Select]
  1. (defun _mleaderstyle (name / e)
  2.   (and (setq e (dictsearch (namedobjdict) "ACAD_MLEADERSTYLE"))
  3.        (setq e (dictsearch (cdr (assoc -1 e)) name))
  4.        (setq e (vlax-ename->vla-object (cdr (assoc -1 e))))
  5.   )
  6.   e
  7. )
  8. ;  (_mleaderstyle "Standard")
Title: Re: Import/Reset Multileader Styles
Post by: Dave M on May 17, 2017, 03:41:57 PM
I appreciate your code snippet, but I have no coding ability whatsoever.
Title: Re: Import/Reset Multileader Styles
Post by: ronjonp on May 18, 2017, 09:38:43 AM
If you want some help, post a drawing of the new mleader style you're trying use to update your drawings.