Jump to content

Change Attributes on 600 Drawings


YZ

Recommended Posts

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

  • YZ

    16

  • JPlanera

    14

  • ReMark

    3

  • BlackBox

    3

Top Posters In This Topic

Posted Images

in my case, with FILEDIA set to 0 my script filwe would look like this

 

-plot

yes

model

dwg to pdf.pc3

ansi expanded a (8.50 x 11.00 inches)

inches

landscape

no

extents

fit

center

no

monochrome.ctb

no

as displayed

c:\dwgtopdf\drawing1

no

no

Link to comment
Share on other sites

FILEDIA changes everything, thanks.

 

Anyone know how to tell AutoCAD not to open the PDF in Adobe Reader once it is created? I can see this crashing with so many PDFs open at once!

Link to comment
Share on other sites

This is what I have in my script file so far:

FILEDIA
0
-ATTEDIT
N
N
*
*
*
20021379
20021385
-PLOT
N
"Layout1"
"A4 COLOUR"
N
N
Y
-PLOT
N

A4 PDF


N
Y
FILEDIA
1

It spits up an error:

"Enter a page setup name : "A4 COLOUR"

not found.

There is a named page setup called "A4 COLOUR" in every dwg and I have been using it successfully in a button macro for duration of project:

^C^C-PLOT;N;;A4 COLOUR;;N;N;Y;PLOT;-PURGE;A;*;N;

Link to comment
Share on other sites

Is it the space in the layer name that is throwing it off?

 

I suspect it is the space. I am not certain what else to do about it because that is what the page setup is named. I put the speech marks " " around it to try to overcome the space issue, but now it seems like it is trying to find a named plot setup with " ".

 

I am looking into using the detailed plot configuration, but it is likely to encounter the same issue when it comes to typing DWG to PDG.pc3 ...

Link to comment
Share on other sites

Wow, I am so close to making this work. It is a revolution for me. Thanks to all for the help. I have tested the script, and it works when I call it up manually. Then I put it into a .bat file like this:

FOR %%f in ("Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\*.dwg") do start /wait C:\"Program Files"\"Autodesk"\"AutoCAD LT 2011"\acadlt.exe "%%f" /b Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\ATTCHANGE.scr

Which spits up the attached error.

 

What am I doing wrong?

Error Message.jpg

Link to comment
Share on other sites

FOR %%f in ("Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\*.dwg") do start /wait C:\"Program Files"\"Autodesk"\"AutoCAD LT 2011"\acadlt.exe "%%f" /b Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\ATTCHANGE.scr

check your quote marks - especially the 2nd one.

 

I now know the command I used to use, it was ATTEDIT :D

and for the record, while 600 is a large number of drawings it isn't that big for batch files either, we regularly used to run 2000 drawings at a time.

Link to comment
Share on other sites

This is what I have in my script file so far:

It spits up an error:

"Enter a page setup name : "A4 COLOUR"

not found.

 

You should not need quotes around Layout1 or A4 COLOUR....

If you stepped through the sequence at the command line

 

 
-plot
n
layout1
a4 colour
etc...

 

does it work that way? Layout name, page setup, and output device, all accept spaces in the input. So using detailed plot config will not give you a problem. In fact that is probably the best option, incase 1 drawing just so happens NOT to have a page setup named A4 COLOUR

Link to comment
Share on other sites

Try it this way

 

(Z:\"2010"\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\"*.dwg")

 

I have made that change to the quotation marks. Then tried other combinations of () and "" as well. Still the error message is the same.

 

Is it possible that the startup stuff in AutoCAD (opening the ribbon and tool palette etc) is interfering? Below is what the command line says up to the error message. I did notice that the command line picks up the rest of the path that is missing from the error message attached in my previous post:

 

SUBURB"_PROPERTY PLANS"STREET: Improper drawing name.

TEST"ATTCHANGE.scr): Improper drawing name.

Loading AEC Base...

Loading AEC Base Extended...

Loading AEC Project Base...

Loading AEC Schedule Data...

Loading AEC Architectural Base...

Loading AEC Base UI...

 

Opening an AutoCAD 2007 format file.

Regenerating layout.

Regenerating model.

 

Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application

or Autodesk licensed application.

Command: _RIBBON

Command: COMMANDLINE

Command: properties

Command: TOOLPALETTES

Command:

Link to comment
Share on other sites

ok.... onw thing i dont see clarified is this... the entire .bat file needs to be ONE line in notepad. if it sees a line break in there it will gag on it.

 

If you still have trouble with it. Move all the drawings to a temp folder that is simple. then change your code to this exactly

 

 

(Z:\TEST\*.dwg)

 

instead of that long string...

Link to comment
Share on other sites

ok.... onw thing i dont see clarified is this... the entire .bat file needs to be ONE line in notepad. if it sees a line break in there it will gag on it.

 

If you still have trouble with it. Move all the drawings to a temp folder that is simple. then change your code to this exactly

 

 

(Z:\TEST\*.dwg)

 

instead of that long string...

 

Yes, the .bat file is all on one single line.

 

I have just made it work on the (Z:\TEST\*.dwg). Thank you SO much JPlanera. I will try one more time to debug my original .bat, otherwise I will move the folders to a simpler path.

Link to comment
Share on other sites

What's odd, is that i created a path on my system that was exactly this

 

(C:\"2010"\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\"*.dwg")

 

and it worked fine....

 

I'm glad you got it going. I'm sure all this work is still better than one by one file editing! :sick:

And you can use this same method for any script file so once you get it solid, you are set!! Post back your solution if you figure out your bug. I'm curious now!

 

Good luck:)

Link to comment
Share on other sites

  • 2 weeks later...

I never tracked down the bug. What I did do was place the .bat and the .scr file in the simplified path "(Z:\TEST\*.dwg)" and then ran it from there. That worked perfectly.

 

My script ended up being bug free also, thank you all for that. It is included, in case anyone interested. I used all the features that were posted on this thread.

FILEDIA
0
-ATTEDIT
N
N
*
*
*
20021379
20021382
-PLOT
Y
LAYOUT1
A4 COLOUR.PC3
A4
M
P
N
E
1:1
C
Y
A4 HOME PLAN.ctb
Y
N
N
N
N
N
Y
-PLOT
Y
LAYOUT1
DWG TO PDF.PC3
ISO full bleed A4 (210.00 x 297.00 MM)
M
P
N
E
1:1
C
Y
A4 HOME PLAN.ctb
Y
N
N
N

N
Y
FILEDIA
1
QSAVE
QUIT
Y

 

What I was left with was 700 PDFs all with the automatically generated "-Layout1" at the end. I could not work out a way in AutoCAD to exclude that. But this adventure, and your help, gave me the confidence and Know-how to write another batch file to rename them:

 

REN SL????CAD[X]-LAYOUT1.PDF "SL????[X].PDF"

 

Effortless. Took a long time to write, but I still think it was quicker than doing this manually. And of course the future possibilities are endless. Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...