Jump to content

Recommended Posts

Posted

Hi everyone,

 

I am using ACAD2025LT and I was looking into the newer "Draw" hatch feature, where you can type hatch and tell the command that you want to draw a hatch along a sort of polyline that you pick. You can pick Alignment, Width whether its going to be just a rectangle or circle etc etc.

 

The only thing I can seem to figure out is if this can be access using LISP.

I have a few idea for hatching as I create something using LISP, but for the life of me I cant figure out how to use the draw hatch feature with lisp. I know lisp forces the use of "-" on a command when used in a lisp routine. Like if you use (command "hatch" ) in a LISP it will actually do (command "-hatch"). Although if you use -hatch you are given a whole different set of options to pick from and the "draw" option is not there.

 

So my question is, Has anyone been able to use this draw option in a LISP routine?

 

Thanks.

Posted

Try using (initcommandversion) before the command call.

Posted

Thanks Lee.

 

I got it to work.

Used this

(initcommandversion)
(command-s "hatch")

 

No -hatch or it wouldnt work as intended.

Posted

So I am using this to try and take a list of points to use the with the hatch Draw command, but I cant get the Hatch command to accept the points in the list.

I think it has something to do with the command-s needing to start and finish in the same function call, but I am not sure.

Can anyone confirm this?

    (initcommandversion)
    (command-s "hatch" "_k" "_d" "_al" "_o" "_w" "4" "_m" "_p")
    (while (= (getvar "cmdactive") 1 )
        (repeat (setq x (length bd-lst))
            (command (nth (setq x (- x 1)) bd-lst))
        )
        (command "")
    )

 

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