how to set the total scale of a mleader in C#?
In German it's called: Gesamtskalierung
I had no Problem with this....
_mLeader.LandingGap = 6;
_mLeader.TextHeight = 60;
_mLeader.MLeaderStyle = _mleaderStyleId;
but the total scale is also very important for me....
I try to add a picture with a red frame so you
can see what I' missing.
Solved! Go to Solution.
Anika, i would help if we new what version your using. For those reading, in the english verstion, it's "Overall Scale", under misc, controls the scale for non-annotative mleaders. I have not the time to test currently, but here's what little i found:
in VS 2012 for acad 2014, there's Mleader.Scale property, but this does not exist in VS 2010 for acad 2013.
Yes it does, thank you. I'm suspecting its something that may not be exposed to the API for 2013. If anyone can confirm this? If so, you may have to scale the mleader object after creating it. I'll try and find some time to play with this later today, hopefully someone else will figure it out before then.
thank you for trying. I also try to find something about this.
Until now I found this one:http://www.theswamp.org/index.php?topic=31861.msg3
but as you said... "that may not be exposed to the API for 2013"...
let's see what we've got tomorrow...
I think what you found with the interop is probably the way. Although perhaps looking into LISP might yield better/easier results?
Anika, heres a quick LISP for you to look at:
(vl-load-com) (defun c:mltest (/ a1 ap mlap mlap1 line) (setq ap (mlcheck)) (if (/= ap T) (mlblk) (princ) ) (setvar "cmleaderstyle" "MKA Arrow Leader - Plan") (initcommandversion 2) (command "mleader") (while (= 1 (getvar "cmdactive")) (command pause) (setq mlap1 (entlast)) ) (setq mlap (vlax-ename->vla-object mlap1)) (vlax-put-property mlap 'TextLineSpacingStyle 2) (vlax-put-property mlap 'TextLineSpacingFactor 1.0) (vlax-put-property mlap 'ScaleFactor 2.0) (vlax-release-object mlap) (princ) )
So the "(vlax-put-property mlap 'ScaleFactor 2.0)" is the line your looking for, currently static value, but could be changed for user input or other.. I took this from one of our existing LISP's so please change things as needed.