After I make hatch, I want my layer back

After I make hatch, I want my layer back

Anonymous
Not applicable
193 Views
3 Replies
Message 1 of 4

After I make hatch, I want my layer back

Anonymous
Not applicable
Hello there,

what is wrong with this command line ...... someone can edit it (to work)
....? (ACAD 2000 -ger-)

(setq layer (getvar "clayer"));(setvar "clayer" "schraff");(command
("-gschraff" "ei" "ansi31" "1" "0");(setvar "clayer" "layer")

The problem:

I have one aktive Layer (f.e. Layer "Help")
Then I want to draw hatch. (the complete command line at the top should
start)
I that case, AutoCAD should change the actual Layer to "Schraff" (special
layer for hatch)
After I make my hatch, I want my layer (before doing hatch) back, as actual
(in that case "Help")
The problem is that AutoCAD don`t wait untill I have done my hatch .....
I have to make a "pause" or a "wait for command end" ......
But with one Pause in the command line I can do one hatch ...(Acad should
wait for user exit command !!)

How can I do this ......... oh please, help me

Thanks a lot , .................. Matthew
0 Likes
194 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Try removing the double-quotes around the variable named "layer", (setvar
"clayer" layer) instead of (setvar "clayer" "layer").
--
John Goodfellow
irtf'nm
use 'microtouch' in address to email

"Matthew $" wrote in message
news:6D3E6DCCB8AA9F2C9BFE4B188894587B@in.WebX.maYIadrTaRb...
> Hello there,
>
> what is wrong with this command line ...... someone can edit it (to work)
> ....? (ACAD 2000 -ger-)
>
> (setq layer (getvar "clayer"));(setvar "clayer" "schraff");(command
> ("-gschraff" "ei" "ansi31" "1" "0");(setvar "clayer" "layer")
>
> The problem:
>
> I have one aktive Layer (f.e. Layer "Help")
> Then I want to draw hatch. (the complete command line at the top should
> start)
> I that case, AutoCAD should change the actual Layer to "Schraff" (special
> layer for hatch)
> After I make my hatch, I want my layer (before doing hatch) back, as
actual
> (in that case "Help")
> The problem is that AutoCAD don`t wait untill I have done my hatch .....
> I have to make a "pause" or a "wait for command end" ......
> But with one Pause in the command line I can do one hatch ...(Acad should
> wait for user exit command !!)
>
> How can I do this ......... oh please, help me
>
> Thanks a lot , .................. Matthew
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
I have tried to paste these lines after a toolbutton made in Autocad but no results yet.
Always get the same message can anyone help?

Command: (setq layer (getvar "clayer"))
"arceren"
Command: (setvar "clayer" arceren)
; error: AutoCAD variable setting rejected: "clayer" nil
Command: (command("-hatch" "p" "ansi31" "2" "0")
(_> (setvar "clayer" "layer") *Cancel*
; error: Function cancelled

thanks in advance!

Cootn
0 Likes
Message 4 of 4

Anonymous
Not applicable
You are in the wrong group.

But your issue is the bad variable name arceren and the bad quotes around
the correct variable name layer.

--
R. Robert Bell


wrote in message news:5523356@discussion.autodesk.com...
I have tried to paste these lines after a toolbutton made in Autocad but no
results yet.
Always get the same message can anyone help?

Command: (setq layer (getvar "clayer"))
"arceren"
Command: (setvar "clayer" arceren)
; error: AutoCAD variable setting rejected: "clayer" nil
Command: (command("-hatch" "p" "ansi31" "2" "0")
(_> (setvar "clayer" "layer") *Cancel*
; error: Function cancelled

thanks in advance!

Cootn
0 Likes