Benjo Posted February 9, 2011 Posted February 9, 2011 Hi y'all, i have a lisp that create hatch on the layer i always use for hatch but i would like to see the dialog box not question on the command prompt and i would like that at the end of the command its return to the layer 0 automaticaly anyone knows how? here the lisp (defun c:H () (command "layer" "M" "A-HATC" "" "" "hatch") ) Thx! Quote
Smirnoff Posted February 9, 2011 Posted February 9, 2011 (edited) Use (initdia) function. (defun c:H ( ) (command "_.-layer" "_M" "A-HATC" "") (initdia) ; allow to command hatch works with dialog (command "_.hatch") (princ) ) Editing. Layer restoration is removed. Now it works. Edited February 9, 2011 by Smirnoff Quote
Benjo Posted February 9, 2011 Author Posted February 9, 2011 Thx smirnoff but it doesn't put the hatch on the layer A-HATCH its the only thing that missing Quote
Tharwat Posted February 9, 2011 Posted February 9, 2011 check this out ..... (defun c:test () (command "_.-layer" "M" "A-HATC" "") (initdia) (command "_.hatch" (while (> (getvar "CmdActive") 0) (command pause))) (setvar 'clayer "0") (princ) ) Tharwat Quote
Smirnoff Posted February 9, 2011 Posted February 9, 2011 Thx smirnoff butit doesn't put the hatch on the layer A-HATCH its the only thing that missing Now code has changed. Try one more time. Quote
Smirnoff Posted February 9, 2011 Posted February 9, 2011 How few sometimes a man need to be happy! I have long been used for things such reactors , and completely forgot that the standard AutoCAD dialog windows interrupt the execution lisp of programs Quote
Tharwat Posted February 9, 2011 Posted February 9, 2011 How few sometimes a man need to be happy! I have long been used for things such reactors , and completely forgot that the standard dialog boxes interrupt the execution lisp of programs Yeah..... That's right . Regards. Tharwat Quote
Benjo Posted February 9, 2011 Author Posted February 9, 2011 Where did you guys learn to built these lisp routine? Quote
Tharwat Posted February 9, 2011 Posted February 9, 2011 Where did you guys learn to built these lisp routine? Along with these great members of this great forum . Regards. Quote
Smirnoff Posted February 9, 2011 Posted February 9, 2011 Where did you guys learn to built these lisp routine? We're working volunteers here. For smiles. If you work with us, too, will learn. 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.