Author Topic: layer previous help  (Read 5333 times)

0 Members and 1 Guest are viewing this topic.

Eloquintet

  • Gator
  • Posts: 3206
layer previous help
« Reply #15 on: February 11, 2004, 04:53:09 PM »
ok daron i've been experimenting and i got this which seems to work

(setq var (getvar "clayer"));(command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" ) ;setvar clayer "0-HATCH";hpname;STEEL;hpscale;.0625;hpang;0;bhatch;\;_LayerP

i was trying to use make instead of new but it put the hatch on 0 layer which is the clayer not 0-hatch

thanks for all your wisdom  :wink:
Dan

AutoCAD Architecture 2015

daron

  • Guest
layer previous help
« Reply #16 on: February 11, 2004, 05:25:48 PM »
(setq var (getvar "clayer"));(command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" "") ;setvar clayer "0-HATCH";hpname;STEEL;hpscale;.0625;hpang;0;bhatch;\;_LayerP

Test that. See if it helps. As far as wisdom; I'm not testing my thoughts. I'm just throwing out ideas.

Eloquintet

  • Gator
  • Posts: 3206
layer previous help
« Reply #17 on: February 12, 2004, 08:00:26 AM »
daron the last format i posted works so i'm just sticking with that thanks though
Dan

AutoCAD Architecture 2015

CADaver

  • Guest
layer previous help
« Reply #18 on: February 12, 2004, 09:39:43 AM »
Just a clarification (if I can) about your comment pertaining to "" instead of ;

In your routine you're mixing LISP functions with menu commands.  And that's fine, a lot of folks do it that way.  I don't, cuz' I'm not smart enough to keep track of where I am.  I tend to use all one or the other.

In LISP, an ENTER in a command call is represented by dbl quotes ""
EX:  (command "-layer" "m" "peanutbutter" "")
That last "" closes the layer command

In menu syntax, the semi-colon represents an ENTER
EX: 'layer;m;peanutbutter;;
notice the two semi-colons at the end, one to enter the layer name PEANUTBUTTER and the last to close the layer command

Me being a keyboard junkie from way back, I tend to make lisp functions for everything.

Eloquintet

  • Gator
  • Posts: 3206
layer previous help
« Reply #19 on: February 12, 2004, 10:59:08 AM »
understood thanks  :lol:
Dan

AutoCAD Architecture 2015

Eloquintet

  • Gator
  • Posts: 3206
layer previous help
« Reply #20 on: February 13, 2004, 01:05:27 PM »
i have one more question about my button. everything is working but the selection in hatch. when i go to pick points it only allows me to select a single area and the dialog comes back up. how do i modify it for multiple selections? here's my button again:

(setq var (getvar "clayer"));(command "-layer" "n" "0-HATCH" "c" "9" "0-HATCH" ) ;setvar clayer "0-HATCH";hpname;STEEL;hpscale;.25;hpang;0;pickstyle;1;bhatch;\;_LayerP
Dan

AutoCAD Architecture 2015

daron

  • Guest
layer previous help
« Reply #21 on: February 13, 2004, 01:08:08 PM »
Your best bet would be to write a lisp that would loop the pick point until you hit enter, then incorporate that command into the button.

Eloquintet

  • Gator
  • Posts: 3206
layer previous help
« Reply #22 on: February 13, 2004, 01:09:55 PM »
hmmm i couldn't just put a pause in there? really need to learn lisp  :cry:
Dan

AutoCAD Architecture 2015

daron

  • Guest
layer previous help
« Reply #23 on: February 13, 2004, 01:20:35 PM »
pause or \ only works once for each time you call it. The problem there is that you don't know how many times you'll call it. As far as learning lisp goes,
A) you should.
B) with (command "-layer" "n" ")-HATCH" "c" "9" "O-HATCH"), you're already some of the way there.
C) It's not that hard and it's fun
D) This particular road-block you're in would be perfect for any of us to help you learn.

If you'd like, start a different thread for this function and let's get you started. It won't take too long. Let's say you spend 30 minutes each day of, say your lunch time, and report in and test the things you're given. You do that and you'll be able to answer many of the questions you have on your own. Start the thread with the process in which you perform the actions you'd like simplified, then we'll show you how to find what you need and get you started writing it.