Jump to content

Recommended Posts

Posted

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!

Posted (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 by Smirnoff
Posted

Thx smirnoff but

it doesn't put the hatch on the layer A-HATCH

its the only thing that missing

Posted

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

Posted
Thx smirnoff but

it doesn't put the hatch on the layer A-HATCH

its the only thing that missing

 

Now code has changed. Try one more time.

Posted

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 :?

Posted
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

Posted

Where did you guys learn to built these lisp routine?:thumbsup:

Posted
Where did you guys learn to built these lisp routine?:thumbsup:

 

Along with these great members of this great forum .

 

Regards.

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

:D

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