Jump to content

Lisp Hatch dialog box?


Benjo

Recommended Posts

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!

Link to comment
Share on other sites

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 by Smirnoff
Link to comment
Share on other sites

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

Link to comment
Share on other sites

How few sometimes a man need to be happy! :shock:

 

I have long been used for things such reactors o:), and completely forgot that the standard AutoCAD dialog windows interrupt the execution lisp of programs :?

Link to comment
Share on other sites

How few sometimes a man need to be happy! :shock:

 

I have long been used for things such reactors o:), and completely forgot that the standard dialog boxes interrupt the execution lisp of programs :?

 

Yeah..... That's right .:)

 

Regards.

 

Tharwat

Link to comment
Share on other sites

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