layer contol routine..How-To..?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
layer contol routine..How-To..?

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
automac
Guest





Posted: Sun Apr 03, 2005 10:55 pm    Post subject: layer contol routine..How-To..? Reply with quote

i have residential designs that have a number of xrefs for various builder options..(sunroom..screen porch options, ect)...
i would like to have a routine that would turn on / off combinations of layers for the various options that the bulder/client needs.
***
i'm totally new to autolisp and programming in general...
-what i visualize would be a dialog box with named layer sets easily selectable at a click...
****
is this doable,..? is it it difficult... where do i start..
(serious newby at programming..)
thanks
mac

Back to top
Laurie Comerford
Guest





Posted: Mon Apr 04, 2005 12:26 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

Hi,

I don't think you need to program this. Start the Layer Manager and look at
the tools available to you there.
If that is not satisfactory, then I'd suggest you start in VBA and not in
Lisp.

--


Laurie Comerford
CADApps
www.cadapps.com.au

"automac" <nospam@address.withheld> wrote in message
news:15155090.1112554564503.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
i have residential designs that have a number of xrefs for various builder
options..(sunroom..screen porch options, ect)...
i would like to have a routine that would turn on / off combinations of
layers for the various options that the bulder/client needs.
***
i'm totally new to autolisp and programming in general...
-what i visualize would be a dialog box with named layer sets easily
selectable at a click...
****
is this doable,..? is it it difficult... where do i start..
(serious newby at programming..)
thanks
mac
Back to top
James Buzbee
Guest





Posted: Mon Apr 04, 2005 10:15 pm    Post subject: Re: layer contol routine..How-To..? Reply with quote

Quote:
If that is not satisfactory, then I'd suggest you start in VBA and not in
Lisp.
:-(


jb

Back to top
Clarence
Guest





Posted: Mon Apr 04, 2005 10:36 pm    Post subject: Re: layer contol routine..How-To..? Reply with quote

that should've been more than enough.....

let me spell it out:

Create a drawing with all of the necessary models for the project, and then make a layer states file with each layer configuration and export the layer states files.

Now, load those files via lisp...........select by dialog box or whatever you want to program!

BTW: You can restore layer state files with Lisp or Vba.
Back to top
automac
Guest





Posted: Wed Apr 06, 2005 12:03 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

J B

what's w/ :-(
..?
Back to top
automac
Guest





Posted: Wed Apr 06, 2005 12:05 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

clearence..
"what" should have been more than enough.?
Back to top
automac
Guest





Posted: Wed Apr 06, 2005 12:08 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

thanks for the suggestions...
-i'll be doing some homework on vba and layer states...
(using 2000..may not have some newer tools...)
mac
Back to top
automac
Guest





Posted: Wed Apr 06, 2005 12:10 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

if anyone else has different or more specific suggestions or tut site...
i'm listening
mac
Back to top
Clarence
Guest





Posted: Wed Apr 06, 2005 12:10 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

Reply From: Laurie Comerford
Date: Apr/03/05 - 15:21 (CDT)

Re: layer contol routine..How-To..?
Hi,

I don't think you need to program this. Start the Layer Manager and look at
the tools available to you there.
If that is not satisfactory, then I'd suggest you start in VBA and not in
Lisp.


what she said^^^^^^^^^^^^^^^^should've been more than enough.....


take her message and mine (below) and you should have the necessary files to flip specific layers on/off or whatever you want.


let me spell it out:

Create a drawing with all of the necessary models for the project, and then make a layer states file with each layer configuration and export the layer states files.

Now, load those files via lisp...........select by dialog box or whatever you want to program!

BTW: You can restore layer state files with Lisp or Vba.
Back to top
Clarence
Guest





Posted: Wed Apr 06, 2005 12:24 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

this is an example but its only for one layer state file.

(defun C:your 3 key ()
(setvar "cmdecho" 0)
(command "-layer" "a" "i" "c:/filepath/your layer states file here.las" "r" "your layer states file here" "d" "your layer states file here" "" "")
(Prompt "\n\nThis command imports, restores, and deletes a layer states file...")
(Prompt "\n\nAdding your layer states file here...")
(Prompt "\n\nyour layer states file here have been set!!!\n")
(setvar "cmdecho" 1)
(princ)
)


post if you still dont understand or need help writing code.
Back to top
automac
Guest





Posted: Wed Apr 06, 2005 2:50 am    Post subject: Re: layer contol routine..How-To..? Reply with quote

found express LMAN..seems simple enough.
***
reading up on lisp ..."inside autocad 2000"
**********
(dis)advantages of lisp vs. vba...?
Back to top
Tom Smith
Guest





Posted: Wed Apr 06, 2005 6:00 pm    Post subject: Re: layer contol routine..How-To..? Reply with quote

No, the layer states manager they're talking about is part of the core layer command, not the express tool. They aren't compatible, and lman is really obsolete (or at least unnecessary) at this point since states were added to the core command.

If you'll search the ng, vba vs lisp has been beaten to death repeatedly, it's unlikely anything new can be said about that.
Back to top
Clarence
Guest





Posted: Wed Apr 06, 2005 6:00 pm    Post subject: Re: layer contol routine..How-To..? Reply with quote

i am not a vba programmer, but have some knowledge of vba. I believe that vba runs faster than lisp. But lisp has more customization abilities. And with lisp you'll have to learn how to create dialog boxes. VBA is dialog box based. However, with lisp you could create a command line version instead of a dialog box.

How much time do you have? What resources do you have access to? I got lucky and found a r13 customization book laying around the office. So I had to go with lisp.

my opinion: write a command line version with lisp. then study vba. I believe it takes less code with vba compared to lisp. Dialog Boxes in Lisp can be time consuming and tricky.

Good Luck!
Back to top
Clarence
Guest





Posted: Wed Apr 06, 2005 6:02 pm    Post subject: Re: layer contol routine..How-To..? Reply with quote

thanks tom.....i didnt notice he was talking about express tools
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB