Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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

Posted

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))

Posted

Thanks guys, all very helpful.

 

God bless!

Posted
quick and dirty....

 

Never gave this much thought as to needing it, but I do see thatit could come in handy!

 

Thanks.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...