< Randy Sanders: MODEM - (602) 946-5239: < VOICE - (602) 946-0735: < < To Whom It May Concern: < Subject: Layer Manipulation: FILENAME < ETC-LYRS.ZIP > < < Hello. Hello & Howdy. < < This is a Bundle of Layer Manipulation Routines that < have been invented out of Necessity. I use these simple Lxx < Routines on constant Basis in The Daily Effort. Please Note < the LFE routine was written by my fellow Compadre in Comput < -er Crime - Greg Petersen. Simple, but useful & handy. < LYR-SHOW includes 2 SUBR's from < Inside AutoLisp by New < Riders Publishing > & LYR-TBLS is a modified LSP based on a < Previous File < TABLES.LSP by Duff Kirkland >. < < These Routines can be accessed thru ACAD.LSP, ie. < To do This Copy the File ADD2ACAD.LSP to your ACAD.lsp < file: This will give You the following > etc, etc. < < (DEFUN C:LC0 () (IF LC0 NIL (LOAD "LYR-LC0")) (C:LC0) (PRINC)) < < LC0 - Layer Copy to 0 < LCX - Layer Copy to X < LCC - Layer Copy to Current < < LM0 - Layer Move to 0 < LMX - Layer Move to X < LMC - Layer Move to Current < < LS0 - Layer Set 0 < LSX - Layer Set X < LSC - Layer Set Current < < LTA - Layer Thaw All < LTX - Layer Thaw X (Type in Layer At Keyboard) < < LFA - Layer Freeze All < LFE - Layer Freeze Entity < (You Pick Entities on Layers to Freeze those Layers) < LFX - Layer Freeze X (Type in Layer At Keyboard) < < LOF - Layer Off (Pick Entity) - Previous lsp.routine The Author is < Unknown to me - randy < LON - Layer On (Type Layer At Keyboard) < < L?? - Layer List (Flipscreen) < LLS - A Simple List of Entity without doing a Flispcreen! < < ----------------------------------------------------------- < < < LYR-TBLS.LSP >: requires < D:\DWG-DATA\ >: < < The Routine < LYR-TBLS.LSP > writes the "Layer - ?" to a < File. If You modify TWO Variables in this routine You can < Customize it to add your own Layer-Identity Definitions. < It requires the Dir & it opens a File < . Modify the variable "ly" in < the COND statement to be your own < Layer-Name. & then modify the variable "d" to be that Lay- < er's-Identity Definition. This can be very useful in keeping < a Hard-Copy Log Book of DWGs per Project. This allows You < to add a Message & automatically writes The DWGs Path-Name & < adds the date to the File. < < It Returns: < < FILENAME: < D:\DWG-DATA\3D-1.ALL > < < D:\MY-3DDWG\3D-1.ALL < DATE: 05/28/90 < < PROTOTYPE CHILD'S PLAYHOUSE: 1X1/1X2/1X1-RND [0.625 TUBE STL]: < < * INDICATES THE CURRENT LAYER: < < Layer Status Color Linetype Description < 0 On 7 CONTINUOUS DEFAULT LAYER < 01 On 1 CONTINUOUS LOWER WALLS < 02 On 2 CONTINUOUS WINDOW FRAMES < 03 On 3 CONTINUOUS MOVABLE WINDOWS < 04 On 4 CONTINUOUS CORNER WINDOWS < 05 On 5 CONTINUOUS CURVED ROOF SECTION < 06 On 6 CONTINUOUS ROOF-1: LOWER SURFS < * 07 On 7 CONTINUOUS ROOF-2: UPPER SURFS < 08 On 8 CONTINUOUS GENERAL SYMBOLS < 09 On 9 CONTINUOUS GENERAL DIMENSIONS < 10 On 10 CONTINUOUS BUILDING GRID LINES < <---------------------------------------------------------------- < < < LYR-SHOW.LSP >: < < You must first, create Two (2) Dirs on The Hard Drive: < < D:\DWG-INFO > Dir for Layer-Identity-Data < D:\DWG-FILE > Dir for Temporary Sorting of etc. Extns. < < This routine was developed out of the necessity to rapidly < set & restore various Layer groups for plotting purposes. < We use a Master-File system, that may have up to 50-60 Lay- < ers: Arch/Civil/Plumb/Hvac/Struct/Elec/Titleborders/Keynotes < /Details/Tables/etc. per drawing. < < Architectural layering alone has various subsets: Exterior/ < Interior - Hardwalls/Modular Panels/Office Layouts/Reflected < Ceiling Plans/Site Details/etc etc. < < 1) (Load "LYR-SHOW") < 2) command: LYR-SHOW < < 3) [Chop/Edit/List/Type] - Show/: < use Make to set ASCII File with. < Default is: : Use with "*" Layers Visible - < Freeze/Thaw your Layers to obtain your Layer-Identity < & choose from The List of Extensions to Strcat to the < DWGNAME. Files are written to < You may wish to Modify Lines 2,4 in The Subr OPENFILE < to fit your own Needs. if You do, You must also Modify < Line 7 of The Subr G-STRING. The "STRINGS" in these < Lines must be The Same. < < 4) use Show to . < Previous saved Extensions are returned through INITGET < This allows only Previously Extensions to be used as < input. Type in a 3-letter Extension that is shown in < the Prompt area & hit a to restore a previously < saved Layer-Identity. You may have to do a Regen after < the screen Redraws to add the Layers that were Frozen. < & I don't know exactly why Layer 0 is not found, I did < not know it was lost to begin with. < < The File reads like This: < < FILENAME: < D:\DWG-INFO\3D-1.ALL > < < 0,01,02,03,04,05,06,07 < D:\MY-3DDWG\3D-1.ALL < DATE: 05/28/90 < < The first Line is passed back to the Layer Command, Line 2 < is the actual \PATHNAME\DWGNAME.EXT & the Date is automatic- < ally added. One Area of Concern That may be a Problem, is: < The 100 Character String Limitation in Autolisp. A large DWG < with VERYLONGTEXTNAME for Layers might be a Problem. as AEC. < We use Two-digits "layer-names", 01-99,D1-D9,E1-E9,M1-M9,etc < The One (1) Time that this happened, I manually shifted some < Characters in the DWGNAME.EXT to the next-line & did a < "read-line" & passed That to the Layer Command. < < Another Item that is somewhat a Bug. Is when using The "S" < option this routine does a FlipScreen. It would be nice to < Eliminate this. & the Extension BAK needs to Eliminated from < the return PROMPT by some kind of filtering. < < One of These Years when Time Permits if SomeOne would like < to Tackle This, it would greatly Appreciated. This Routine < is functional, but subject to further Improvements. My big- < gest headache with Autocad is LAYERS. & keeping all of the < Various Plotting Identities consistant. < < Hopefully, This will be of Help. Go Golf > randy < < ps. There are several SAMPLE FILES included in with all of < This: < < ETC-LYRS.dwg is a small sample.dwg < & PUT THE FOLLOWING INTO IT: < < ETC-LYRS.all a File containing ALL Layers < ETC-LYRS.asb : This contains etc. Layers. < ETC-LYRS.bkg : This contains etc. Layers: < ETC-LYRS.cvl : This contains etc. Layers: < ETC-LYRS.dem : This contains etc. Layers: < < !!!! MAKE A DIRECTORY : ETC-LYRS.lsp will auto- < matically put a ! File into This DIRECTORY. < < < < Bring up ETC-LYRS.dwg: < < (LOAD "ETC-LYRS") < COMMAND: ETC-LYRS < & FOLLOW THE PROMPTS. FOR FURTHER < INFORMATION READ IT IS AS FULLY DOCUMENTED AS < I AM CAPABLE OF DOING TO IT. < good Luck!