Does anyone know if Multileader Text Frame Offset is Adjustible?

Does anyone know if Multileader Text Frame Offset is Adjustible?

rapidcad
Collaborator Collaborator
4,823 Views
3 Replies
Message 1 of 4

Does anyone know if Multileader Text Frame Offset is Adjustible?

rapidcad
Collaborator
Collaborator

Hi all, I've been experimenting with this most of the day and still can't seem to figure this out. I'm writing a program that draws multileaders to grab attributes from a block and populate the mtext of the multileader. The goal is to have a tag which displays the values of several hidden attributes in the target block. I have this working except for some minor details which I would love to get right.

 

I have the mleader set to put a text frame around it, and to use a background mask using background color. I can control the offset for the mask (dxf code 141) which I am setting to 1.1.  This works nicely, but it still looks bad because there isn't much margin around the text within the text frame.

 

texttootight.JPG

 

Isn't there a control for this?

 

Something I can set using dxf codes or a vla-put method?

 

This text needs some padding.

 

Any help greatly appreciated.

 

Ron

ADN CAD Developer/Operator
0 Likes
4,824 Views
3 Replies
Replies (3)
Message 2 of 4

greg_battin
Advocate
Advocate

I'm not sure what version you are using, but adjusting the "Landing Gap" adjusted it for me in my test (see below) The DXF codes are also shown

 

Landing Gap.jpg

 

Landing Gap DXF.jpg

Landing Gap DXF Group Code.jpg

0 Likes
Message 3 of 4

rapidcad
Collaborator
Collaborator

Thanks Greg - I wasn't changing the landing gap in 2011, but in 2013 and above I was, and that works nicely for the newer versions. Unfortunately, it only lives up to its name in 2012 and below. By that I mean that it only makes the landing gap larger, it dosen't have the padding effect on the frame with the later versions.

 

 Capture.JPG

 

Here's my futile attempt to change it in all versions:

 

(initcommandversion 1)
(vl-cmdf "._mleader" "o" "m" "2" "c" "m" "x" arrwpt	pikpt tagval)
    (setq ent (entlast))
    (vla-put-TextJustify (vlax-ename->vla-object ent) 2)

(if	(>= (atof (substr (getvar "acadver") 1 4)) 19.0)
      (progn
	(vla-put-LandingGap (vlax-ename->vla-object ent) 0.046875)
	(vla-put-TextBackgroundFill
	  (vlax-ename->vla-object ent)
	  :vlax-true
	)
      )
      (progn
	(setq ed (entget ent))
	(setq new291 (cons 291 1))	;background color on?
	(setq new292 (cons 292 1))	;background fill on?
	(setq new141 (cons 141 1.1))	;offset for mask
	(setq new145 (cons 145 0.046875))	;landing gap


	
	(setq ed
	       (subst new141
		      (assoc 141 ed)
		      ed
	       )
	)
	(entmod ed)
	(setq ed
	       (subst new291
		      (assoc 291 ed)
		      ed
	       )
	)
	(entmod ed)
	(setq ed
	       (subst new292
		      (assoc 292 ed)
		      ed
	       )
	)
	(entmod ed)
		(setq ed
	       (subst new145
		      (assoc 145 ed)
		      ed
	       )
	)
	(entmod ed)
      )
    )

 

Funny, I can set the gap in 2011 with the vla-put method, but my entity substitution method doesn't seem to apply anything. Anyway, even if I do change it, no matter what, the effect is still wrong because the changes they made in AutoCAD 2013 aren't there.

 

Thanks though for the very nice info regarding this.

 

ADN CAD Developer/Operator
0 Likes
Message 4 of 4

rapidcad
Collaborator
Collaborator
I meant to say...
Unfortunately, it only lives up to its name in 2012 and below. By that I mean that it only makes the landing gap larger, it doesn't have the padding effect on the frame LIKE IE DOES with the later versions.
ADN CAD Developer/Operator
0 Likes