I have been working on a few different things to make mleaders better, adding some of the qualities of the qleader that I liked and used. I have however run into a bit of a snag. This is the entget that is displayed when selecting a multileader:
((-1 . <Entity name: 7e366800>) (0 . "MULTILEADER") (330 . <Entity name:
7e5f6d40>) (5 . "14B8") (100 . "AcDbEntity") (67 . 1) (410 . "08-104-02") (8 .
"Dim") (100 . "AcDbMLeader") (300 . "CONTEXT_DATA{") (40 . 1.0) (10 1.28564
18.5249 0.0) (41 . 0.1) (140 . 0.15) (145 . -0.15) (174 . 6) (175 . 1) (176 .
0) (177 . 0) (290 . 1) (304 . "APPLY TOPSOIL SURFACE, SALV, 3\";\\PSEEDING,
MIXTURE TUF (220#/ACRE);\\PAND FERTILIZER, CHEMICAL NUTRIENT,\\PCL A
(228#/ACRE) TO ALL DISTURBED\\PAREAS NOT TO BE PAVED (TYP.).\\PINSTALL MULCH
BLANKETS ON ALL\\PDITCH SLOPES OR AS DIRECTED BY\\PTHE ENGINEER IN THE FIELD.")
(11 0.0 0.0 1.0) (340 . <Entity name: 7e5f8488>) (12 1.13564 18.6449 0.0) (13
1.0 0.0 0.0) (42 . 0.0) (43 . 0.0) (44 . 0.0) (45 . 1.0) (170 . 1) (90 .
-1073741824) (171 . 1) (172 . 5) (91 . -1073741824) (141 . 0.0) (92 . 0) (291 .
0) (292 . 0) (173 . 0) (293 . 0) (142 . 0.0) (143 . 0.0) (294 . 0) (295 . 0)
(296 . 0) (110 4.71454 19.7116 0.0) (111 1.0 0.0 0.0) (112 0.0 1.0 0.0) (297 .
0) (302 . "LEADER{") (290 . 1) (291 . 1) (10 4.71454 18.5849 0.0) (11 -1.0 0.0
0.0) (90 . 0) (40 . 0.743185) (304 . "LEADER_LINE{") (10 4.71454 19.7116 0.0)
(91 . 0) (305 . "}") (303 . "}") (301 . "}") (340 . <Entity name: 7e366198>)
(90 . 267488) (170 . 1) (91 . -1023410171) (341 . <Entity name: 7e5f6ca0>) (171
. -2) (290 . 1) (291 . 1) (41 . 0.48133) (42 . 0.15) (172 . 2) (343 . <Entity
name: 7e5f8488>) (173 . 6) (95 . 1) (174 . 1) (175 . 0) (92 . -1073741824) (292
. 0) (93 . -1056964608) (10 1.0 1.0 1.0) (43 . 0.0) (176 . 0) (293 . 0) (294 .
0) (178 . 0) (179 . 1) (45 . 1.0))
I am trying to get the line spacing style to automatically switch to exact, as currently just like the qleader, Autodesk forgot to make the mleader text follow the tspacestyle system variable. I will be using a reactor to get this program to run, but that is not my area of concern. My question is, can anyone help me find out why my program isnt working as I think it should. The following program is supposed to replace the dxf code in red above with (170 . 2). When in reality when run, it changes the dxf code in blue above to (170 . 2) and changes the code marked in green to (45 . 2.0). Is my code telling the mleader to change those properties, and I am just totally dense and cant see it, or does anyone have any other suggestions.
(defun mleaderspfac (/ obj objent objentdata line flag)
(if (setq obj (ssget "_L"))
(progn (setq objent (ssname obj 0)
objentdata (entget objent)
)
(if (/= (equal (assoc 170 objentdata) '(170 . 2)) t)
(progn
(setq objentdata
(subst '(170 . 2) (assoc 170 objentdata) objentdata)
) ;_ end of setq
(entmod objentdata)
) ;_ end of progn
) ;_ end of if
)
)
)
The second part of multileaders that I am trying to correct is the apparent inability to allow text on the left side of the leader to extend under the leader line when left justify is turned on. I have found a way to manually allow the user to extend the leader tail into the "text box", but would ultimatley like to be able to have this run automatically. My question is, when you have a large piece of text as in the 304 dxf code above, is there a way to determine the longest line of text and the shortest line of text? To accomplish this task, I think I would probably subtract the length of the short line from the long line and apply a negative landing gap.
Thanks,