PDA

View Full Version : script question



Dipali
10th Mar 2008, 07:20 am
I am a beginner in using script.
I often received 3rd party drawings, i need to work with. They have grid on & some other stuffs, to remove them I run standard script file(attached here) which I have written.
at the end of its run it stops at following prompt
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:
so here if i press enter it ends the script. i triedd to get rid of this step but no success.

Also i want to add one more step to it. when I receive there drawings, they have '0' as their current layer but some other color as current color instead of by layer. I need to set it to by layer so what should i add to the script?

Dipali
10th Mar 2008, 07:22 am
Here is the script file I use

dbroada
10th Mar 2008, 07:42 am
you probably have a blank line after the last visible line of the script. AutoCAD sees this as a "repeat last command". I usually end scripts with RESUME these days to stop that.

To change the colour, replace white with byLayer

Dipali
10th Mar 2008, 08:01 am
you probably have a blank line after the last visible line of the script. AutoCAD sees this as a "repeat last command". I usually end scripts with RESUME these days to stop that.



To change the colour, replace white with byLayer

I tried putting resume but it does this
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: resume

& if I am adding a blank line before resume it stops like before at that prompt. what do u write in script for "press enter"

Replacing white with bylater does not work.
i think i was not clear so attching the image file. so when i open file i see 0 as current layer but "color 40" as current colr as highlighted in image file. i need to change that to by layer using script

SEANT
10th Mar 2008, 08:07 am
Try this one.

Dipali
10th Mar 2008, 08:25 am
Thanks SEANT,
It worked