TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Birdy on February 24, 2005, 08:53:27 AM

Title: SCRIPT FILE HELP
Post by: Birdy on February 24, 2005, 08:53:27 AM
Hope this is the right place for this.  (Sorry if it ain't)

I've got a CD of about 225 dxf files I'm prepping for our server.
Got em all converted, "zero-layered" ,purged, z.9x, etc. using script pro.

Here's the bugger:
Everything is on layer 0, but rather than color: Bylayer, it's color: 39 (WTH were they thinking?)  

Can anyone help me with a .scr file that'll change the color of layer 0 to bylayer?  I don't wanna do this manually through 225 files.

TIA
Title: SCRIPT FILE HELP
Post by: ELOQUINTET on February 24, 2005, 09:05:14 AM
there's a lisp floating around here for converting all colors to bylayer. i'm sure this could be modified by somebody here to make it global so you could run it through a script. i believe the routine belongs to mark so you might want to ask him about it. good luck
Title: SCRIPT FILE HELP
Post by: hudster on February 24, 2005, 09:05:52 AM
this should work

Code: [Select]
change
all

properties
color
bylayer

;;;end of script
Title: SCRIPT FILE HELP
Post by: ELOQUINTET on February 24, 2005, 09:08:25 AM
yeah or that  :oops:
Title: SCRIPT FILE HELP
Post by: Birdy on February 24, 2005, 09:11:21 AM
Gracias :)
Title: SCRIPT FILE HELP
Post by: Birdy on February 24, 2005, 11:55:52 AM
Alright, how bout adding to this a little.

How can I get all text to standard textstyle,
and while we're at it ; all dimensions to standard dimstyle.  I've goofed 'round a bit but can't seem to quite get it.

again, TIA
Title: SCRIPT FILE HELP
Post by: whdjr on February 24, 2005, 02:33:30 PM
If the ones named standard that were in those files have already been purged then you would have to recreate them.(http://smilies.sofrayt.com/fsc/sobbing.gif)
Title: SCRIPT FILE HELP
Post by: Birdy on February 24, 2005, 02:53:52 PM
No, they're there.  What I (already) did was open a drawing, select all, and select "standard"
in my text style control drop down thingy, qsave, and that did it quiet easily.  Just a lotta work to do for so many files.  It seems I should be able to automate it via script.

I did write another .scr to pedit pline widths to suit our style:
Code: [Select]

pedit
multiple
all

width
0
join
0

qsave

I'm also using the following:
Code: [Select]

ZOOM E
ZOOM .9X
SAVE


and.....
Code: [Select]

CLAYER
0
LAYCUR
ALL

-PURGE
A
*
N


QSAVE

to clean everything up. (not to mention "colorbylayer.scr" thanks Hudster!)
I want to combine all these into ONE routine that'll handle everything, including dimensions and text, so stuff we get from others to use in block libraries will all be layer 0 (bylayer) standard dimensions and text.  Maybe running a lisp via script pro would be better, eh?

Rather new to the programming end of acad, so you can see I'm jazzed about the possibilities.
Title: SCRIPT FILE HELP
Post by: Birdy on February 24, 2005, 07:58:54 PM
FWIW I got it all figured out.  Found a lisp to fix all text and combined everything into one .scr file.  Maybe not the most elegant way to go about this but it does work.  Thanks all for pointing me in the right direction.