See attached code.
1. run the lisp in paper space.
2. the lisp prompt you to select a point on the block IN PAPER SPACE!! - click on the block.
3. click on the start point of the MLeader arrow - you are in paper space, no wories...
4. place the MLeader.
5. if you want to label another block go ahead.
6. to exit hit escape key or mouse right click.
EDIT: the lisp works in model space as well.
(defun c:MLeaderWBlname( / *error* temperr osnp tm tagname ptms ss ensel obj obj1 nam);ptps ptps1
(setq temperr *error*);store *error*
(setq *error* trap1);re-assign *error*
(setq osnp (getvar "OSMODE"))
(setvar "OSMODE" 0)
(setq tm (getvar "TILEMODE"))
(princ "Select object in paper space,select start point of MLeader,exit with esc'")
(while 1
(if (= tm 0);if in paper space
(progn
(getpoint) ;;get point in paper space on the target object
(command "._MSPACE")
(setq ptms (cadr (grread t)));;get the point where the cursor is on the target object in model space
(setq ss (ssget ptms));;selction set of the object crossing the ptms point
(setq obj(ssname ss 0))
(command "._PSPACE")
);progn
(progn ;in model space
(setq ensel (entsel "\nSelect Block: ")) ;select the block object to copy
(setq obj (car ensel)) ;set the block object to varaible
);progn
);if
(setq obj1 (vlax-ename->vla-object obj))
(setq nam
(vlax-get-property obj1
(if (vlax-property-available-p obj1 'effectivename)
'effectivename
'name
)
)
)
(command "_mleader" "H" pause pause nam)
);end while
(setq *error* temperr)
(princ)
)
(defun trap1 (errmsg)
(command "._PSPACE")
(SETVAR "OSMODE" osnp)
(princ)
)
Just an idea for internal boundaries, not just one, if you make a list of ((area1 ent1)(area2 ent2)...) you can sort on areas the only one to keep is the second largest area, you have entity names so can erase all the others. Have a go plenty here will help if you get stuck.
Easy solution NO CODE, draw a closed pline around your shapes, Type Bpoly, pick point between shapes and out side pline, a pline around outside of shapes should be there now erase outer plines, yes plines as bpoly adds one to outside.
To keep the dimension associated with the measurement, I'd create a new style identical to the current one, only without the diameter symbol. Change the name by one letter so it shows up next to the original in the list, and you'll remember to update both styles if that becomes necessary.
Can you not just click on the dim and in properties just remove the %%d or the dia symbol. You can overwrite any dim, if you replace the text with <> it should revert back to the actual distance.
One way to do this would be to draw a temporary construction line from endpoint to endpoint. Then you can draw a circle at the midpoint of that line and then delete the line.
Also, working in 2D wireframe mode, instead of Xray mode, makes it easier to work without the faces getting in the way.