TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: wjbzone on July 17, 2007, 08:06:10 AM

Title: point filter routine for a 3dpoly
Post by: wjbzone on July 17, 2007, 08:06:10 AM
I want to draw a 3dpoly line using point filters. Each point of the 3dpoly should osnap to .Z of one object and .XY of another object.

Is there an easy way can I speed this up with autolisp routine?

Or will have to build the 3dpoly point list and use entmake to accomplish. (not easy for me)

Thanks ,
Bill
Title: Re: point filter routine for a 3dpoly
Post by: gile on July 17, 2007, 08:40:51 AM
Hi,

What kind of objects do you want to use as point filter ?
Can you post an example (dwg) ?
Title: Re: point filter routine for a 3dpoly
Post by: Bred on July 17, 2007, 09:10:18 AM
Hello,
   
1-There is to you it a bond between “XY” object and "Z" object?
2-how you select “XY” object and "Z" object?
Title: Re: point filter routine for a 3dpoly
Post by: wjbzone on July 17, 2007, 02:25:33 PM
I need each point of the 3dpoly to osnap to the .z of endpoint and to the .xy of the current osmode.
There is not a bond between the two objects.

Title: Re: point filter routine for a 3dpoly
Post by: gile on July 17, 2007, 02:49:09 PM
I'm not sure to understand, do you want somethig like this ?

Code: [Select]
(defun c:3dpoly_filter ()
  (command "_3dpoly")
  (while (/= 0 (getvar "CMDACTIVE"))
    (command ".z" "_end" pause)
  )
)
Title: Re: point filter routine for a 3dpoly
Post by: wjbzone on July 17, 2007, 03:22:30 PM
Thanks gile,
That is exactly what I need!

I did not know about the "cmdactive" variable, and that you can use it in a while loop during a active command.  Very good thing. I just added one line for a prompt:
Code: [Select]
(defun c:3df ()
  (command "_3dpoly")
  (while (/= 0 (getvar "CMDACTIVE"))
    (princ "Pick z")
    (command ".z" "_end" pause)
  )
)