Hi, is there a lisp that could trim around text? thanks, dennis
In addition to others' suggestions, you'll find that the TRIM command will do what you ask, as well. ___
Use TRIM if you want to cut and delete a line under text. This will only work on entities that can be trimmed, such as lines, polylines, circles, arcs, etc. It will not trim a block or a hatch pattern. Use TEXTMASK to "hide" entities underneath the text. This will not cut and/or delete the entities. It only hides them on the screen and when plotting. WIPEOUT can also be used, but I prefer TEXTMASK for use on text. I use WIPEOUT to hide entities beneath blocks.
thanks for the all the response! follow-up question, can i copy/modify textmask in r14, so i can use it in r2002? If so, how? thanks again! dennis
Try this: (vl-load-com) (prompt "\nType >>> testtrim <<< to load\n") (defun C:testtrim () (setq adoc (vla-get-activedocument (vlax-get-acad-object) ) mdsp (vla-get-modelspace adoc) util (vla-get-utility adoc) ) (vla-getentity util 'txt 'pt1 "\nSelect text:\n" ) (vla-highlight txt :vlax-true) (vla-getentity util 'lin 'pt2 "\nSelect object to trim:\n" ) (vla-highlight txt :vlax-true) (vla-getboundingbox txt 'll 'ur) (setq p1 (trans (vlax-safearray->list ll) 1 0) p3 (trans (vlax-safearray->list ur) 1 0) p2 (trans (list (car p3) (cadr p1) (caddr p1)) 1 0) p4 (trans (list (car p1) (cadr p3) (caddr p1)) 1 0) pt_list (apply 'append (list p1 p4 p3 p2 p1)) ) (setq rect (vla-addpolyline mdsp (vlax-safearray-fill (vlax-make-safearray vlax-vbdouble (cons 0 (1- (length pt_list))) ) pt_list ) ) ) (setq int_pts (vlax-safearray->list (vlax-variant-value (vla-intersectwith lin rect acExtendNone) ) ) ) (while (caddr int_pts) (setq trm_pts (cons (list (car int_pts) (cadr int_pts) (caddr int_pts)) trm_pts ) ) (setq int_pts (cdddr int_pts)) ) (vl-cmdf "_.break" (vlax-vla-object->ename lin) "" "_f" (car trm_pts) (cadr trm_pts) "" ) (vla-delete rect) (vlax-release-object rect) (vlax-release-object txt) (vlax-release-object lin) (vla-regen adoc acactiveviewport) (princ) ) thank you