Strydaris Posted 8 hours ago Posted 8 hours ago 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. Quote
Lee Mac Posted 6 hours ago Posted 6 hours ago Try using (initcommandversion) before the command call. Quote
Strydaris Posted 5 hours ago Author Posted 5 hours ago Thanks Lee. I got it to work. Used this (initcommandversion) (command-s "hatch") No -hatch or it wouldnt work as intended. Quote
Strydaris Posted 3 hours ago Author Posted 3 hours ago 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 "") ) Quote
Steven P Posted 1 hour ago Posted 1 hour ago Am not sure if that would work, I use something along the lines of this link: But Lee Macs code - the one I use is VLA- and VLAX- so not sure it would work in LT. There is a simpler example entmake a hatch which might be what you want to do? Quote
BIGAL Posted 55 minutes ago Posted 55 minutes ago Have a look at this it's a hatch answer, may be similar to what you want. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/problem-with-lisp-files/td-p/14027683 Let me know if want more info. Quote
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.