Hi gang,

I'm working on a routine for inserting annotative multi-leaders that are scaled by a scale factor determined by the current INSUNITS value. I can do it for non annotative styles usingt he MLEADERASCALE variable. But when an annotative mleader style is current you cannot affect the value oif MLEADERSCALE.

I have this working for blocks. It allows my staff to insert blocks from the tool palette into any drawing (Imperial, Metric, Etc.) so I only have to manage one set of blocks.

I'm hitting a snag when it comes to multi-leaders though. Here's the code so far. The tricky part is in red. Any help is always appreciated.


Code:
(defun C:CurveTag( / CL CMLS SCL)


;;;;; Collect current layer, and current mleader style
(setq CL (getvar "CLAYER"))
(setq CMLS (getvar "CMLEADERSTYLE"))


;;;;; Collect units information and set scale
(cond ((= (getvar "INSUNITS") 1) (setq SCL 1))
      ((= (getvar "INSUNITS") 2) (setq SCL 0.08333))
      ((= (getvar "INSUNITS") 4) (setq SCL 25.4))
      ((= (getvar "INSUNITS") 5) (setq SCL 2.54))
      ((= (getvar "INSUNITS") 6) (setq SCL 0.0254))
      (t (alert "Current DWG set to non-standard units.  Check UNITS settings"))
)




;;;;; set current layer, and current mleader style
(command "_.-Layer" "m" "L-ANNO-SYMB" "c" "3" "L-ANNO-SYMB" "")
(setvar "CMLEADERSTYLE" "MNLA Curve Tag")




;;;;; issue MLEADER COMMAND and scale mleader object by SCL
(command "MLEADER")

;; SCALE last object by factor of SCL about insertion point of leader ;;




;;;;; Return current layer and OSMODE to original values
(setvar 'CLAYER CL)
(setvar 'CMLEADERSTYLE CMLS)
(princ)
)