cadmanrob Posted January 6, 2017 Share Posted January 6, 2017 Hi, I've searched several forums looking for a lisp routine that can hatch a text boundary but can't find anything. I need to hatch directly over text and/or mtext. Is there anything out there that will allow me to hatch the text within the boundaries that would normally be used as a mask, or in the case of mtext...the text background boundary? Thanks, rob Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 6, 2017 Share Posted January 6, 2017 Wouldn't disabling island detection allow you to hatch over text? Quote Link to comment Share on other sites More sharing options...
Grrr Posted January 6, 2017 Share Posted January 6, 2017 Hi, For background mask check this. For overlapping IMO its easy to provide a solution. Quote Link to comment Share on other sites More sharing options...
cadmanrob Posted January 6, 2017 Author Share Posted January 6, 2017 Basically, I want to be able to select the text or mtext as a valid boundary. Quote Link to comment Share on other sites More sharing options...
Grrr Posted January 6, 2017 Share Posted January 6, 2017 I'm not sure what do you mean by boundary. Here are few scenarios: hatching over (using boundingbox) hatching below (using boundary) Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted January 6, 2017 Share Posted January 6, 2017 Something like this? Quote Link to comment Share on other sites More sharing options...
cadmanrob Posted January 6, 2017 Author Share Posted January 6, 2017 Something like this? Yes, rkmcswain...exactly like that...with the ability to work mtext as well. @grrr...a boundary that is used/generated when using the wipeout from the textmask command. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted January 9, 2017 Share Posted January 9, 2017 This is mostly some code I had for doing something similar at one time. It will essentially work for any selected object, and of course there is no error checking here. (defun c:foo ( / sel obj var1 var2 pt1 pt2) (setq sel (entsel)) (setq obj (vlax-ename->vla-object (car sel))) (vlax-invoke-method obj 'GetBoundingBox 'var1 'var2) (setq pt1 (vlax-safearray->list var1) pt2 (vlax-safearray->list var2) ) (vl-cmdf "bhatch" "_W" "_N" pt1 (list (car pt1)(cadr pt2)) pt2 (list (car pt2)(cadr pt1)) "_C" "" "_P" "ANSI35" "1.0" "0.0" "" ) ) Quote Link to comment Share on other sites More sharing options...
cadmanrob Posted January 9, 2017 Author Share Posted January 9, 2017 This is mostly some code I had for doing something similar at one time.It will essentially work for any selected object, and of course there is no error checking here. (defun c:foo ( / sel obj var1 var2 pt1 pt2) (setq sel (entsel)) (setq obj (vlax-ename->vla-object (car sel))) (vlax-invoke-method obj 'GetBoundingBox 'var1 'var2) (setq pt1 (vlax-safearray->list var1) pt2 (vlax-safearray->list var2) ) (vl-cmdf "bhatch" "_W" "_N" pt1 (list (car pt1)(cadr pt2)) pt2 (list (car pt2)(cadr pt1)) "_C" "" "_P" "ANSI35" "1.0" "0.0" "" ) ) Thanks! That works great! I made an adjustment for the pattern type...but still very much what I was looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.