Johntosh Posted November 13, 2008 Share Posted November 13, 2008 I'm seeking to overlay a ANSI31 hatch over a previous one but offset it (to get a two colour alternating line affect), I'm supposing I'll need the hatch origin point and then calculate from there? Quote Link to comment Share on other sites More sharing options...
profcad Posted November 13, 2008 Share Posted November 13, 2008 It's typically 0,0 unless it was changed. There is an option on the hatch dialog box to change the origin. You may need to rehatch the first hatch pattern and specify the origin, then hatch the second area with the new origin. Quote Link to comment Share on other sites More sharing options...
lpseifert Posted November 13, 2008 Share Posted November 13, 2008 quick and dirty.... (defun c:test () (setq htch (entget (car (entsel "Select hatch: ")))) (if (/= (cdr (assoc 0 htch)) "HATCH") (progn (princ "\nSelected object is not a hatch, try again") (command) (princ) ) ;progn (princ (strcat "\nHatch origin is "(rtos (cdr (assoc 43 htch)))","(rtos (cdr (assoc 44 htch))) ) ) ) ;if (princ) ) ;defun Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 13, 2008 Share Posted November 13, 2008 If you want to use the point for future reference within a LISP, just use an entsel/entlast command (as in lpseifert's LISP), then use the following: (setq a (entget (car (entsel)))) ; <<--->> OR (setq a (entget (entlast))) (setq b (cdr (assoc 43 a))) (setq c (cdr (assoc 44 a))) (setq d (list b c)) Quote Link to comment Share on other sites More sharing options...
Johntosh Posted November 13, 2008 Author Share Posted November 13, 2008 Thanks guys, all very helpful. God bless! Quote Link to comment Share on other sites More sharing options...
dtkell Posted November 13, 2008 Share Posted November 13, 2008 quick and dirty.... Never gave this much thought as to needing it, but I do see thatit could come in handy! Thanks. 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.