Author Topic: Routine or lisp I would like help with to create, please!  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.

CECE_CAD

  • Guest
Routine or lisp I would like help with to create, please!
« on: October 04, 2006, 10:05:47 AM »
I had asked about learning how to right lisps and routines, well I have a good one that I would like to try, might be a little hard because I have no idea how to start it. I would like to create a routine that keeps specific layers above others, and then sets all other layers to back.  Is this possible?

pmvliet

  • Guest
Re: Routine or lisp I would like help with to create, please!
« Reply #1 on: October 04, 2006, 10:14:55 AM »
You may want to try a search of these forums. I know this has been discussed here by the use of reactors or something like that....

Pieter

daron

  • Guest
Re: Routine or lisp I would like help with to create, please!
« Reply #2 on: October 05, 2006, 06:30:46 AM »
For starters:
Code: [Select]
(defun c:layerforward()
(princ)
)
That's a start. Now, what you need to do is write a list of things in order of importance that need to happen, like: Collect all items in the layer table. If layer x or xy or xyz exist, draworder, select all objects on said layers, move to front. That or the inverse should work. I tend to find that using back tends to work better than front. However, you could accomplish this quite simply by using filter and then working through the draworder command, but that's not why you're here, is it?

Now, a thought from my friend Paul Simon: "The problem is all inside your head, she said to me. The answer is easy if you take it logically. I'd like to help you in your struggle to be free. There must be 50 ways..." to write your code. I'm sure you'll get more help as you progress, but the best thing is to learn to write your code out in plain language first. IOW, what are the steps that need to be taken before writing any code.