PLT files

PLT files

Anonymous
Not applicable
802 Views
21 Replies
Message 1 of 22

PLT files

Anonymous
Not applicable
I'm no expert with PLT files, but perhaps there is someone who is, that can
help me.

In the end I would like to make a bunch of plt files from AutoCAD and have
them all go out to the printer at once ( not giving others the chance to
sneak in drawing in the middle somewhere). I have to do some funky
rearranging of the order of the plt files based on the file names, so I am
going have to make something custom and not use and existing application.
Although I would like to some how combine them into one big plt file, I
would be very pleased to know how to send plt files to a printer for
printing. Any help is much appreciated.

Thanks in advance,
Aaron
0 Likes
803 Views
21 Replies
Replies (21)
Message 2 of 22

Anonymous
Not applicable
This requires a reference to "Microsoft Scripting Runtime." The first argument
should be a string containing the full path to the .plt file (including
extension). The second argument is a string containing the name of the printer
port (i.e. "LPT1:" or perhaps \\Plotserver\Plotter ).

Sub SpoolFile(ByRef strFile As String, ByRef strPort As String)
Dim objFileSys As FileSystemObject
Set objFileSys = CreateObject("Scripting.FileSystemObject")
objFileSys.GetFile(strFile).Copy strPort
Set objFileSys = Nothing
End Sub

"Aaron Warnke" wrote in message news:3ed7847d@news.qgraph.com...
> I'm no expert with PLT files, but perhaps there is someone who is, that can
> help me.
>
> In the end I would like to make a bunch of plt files from AutoCAD and have
> them all go out to the printer at once ( not giving others the chance to
> sneak in drawing in the middle somewhere). I have to do some funky
> rearranging of the order of the plt files based on the file names, so I am
> going have to make something custom and not use and existing application.
> Although I would like to some how combine them into one big plt file, I
> would be very pleased to know how to send plt files to a printer for
> printing. Any help is much appreciated.
>
> Thanks in advance,
> Aaron
>
>
0 Likes
Message 3 of 22

Anonymous
Not applicable
Do you know of any what to "merge" plt files?

Thanks,
Aaron


"Chuck Gabriel" wrote in message
news:986117C1BB1C88178C70694544FBD187@in.WebX.maYIadrTaRb...
> This requires a reference to "Microsoft Scripting Runtime." The first
argument
> should be a string containing the full path to the .plt file (including
> extension). The second argument is a string containing the name of the
printer
> port (i.e. "LPT1:" or perhaps \\Plotserver\Plotter ).
>
> Sub SpoolFile(ByRef strFile As String, ByRef strPort As String)
> Dim objFileSys As FileSystemObject
> Set objFileSys = CreateObject("Scripting.FileSystemObject")
> objFileSys.GetFile(strFile).Copy strPort
> Set objFileSys = Nothing
> End Sub
>
> "Aaron Warnke" wrote in message news:3ed7847d@news.qgraph.com...
> > I'm no expert with PLT files, but perhaps there is someone who is, that
can
> > help me.
> >
> > In the end I would like to make a bunch of plt files from AutoCAD and
have
> > them all go out to the printer at once ( not giving others the chance to
> > sneak in drawing in the middle somewhere). I have to do some funky
> > rearranging of the order of the plt files based on the file names, so I
am
> > going have to make something custom and not use and existing
application.
> > Although I would like to some how combine them into one big plt file, I
> > would be very pleased to know how to send plt files to a printer for
> > printing. Any help is much appreciated.
> >
> > Thanks in advance,
> > Aaron
> >
> >
>
>
0 Likes
Message 4 of 22

Anonymous
Not applicable
I've never heard of one, but I can't imagine why it would be necessary either.
What are you trying to accomplish that you can't do with individual plot files?


"Aaron Warnke" wrote in message news:3edb61a7$1@news.qgraph.com...
> Do you know of any what to "merge" plt files?
>
> Thanks,
> Aaron
0 Likes
Message 5 of 22

Anonymous
Not applicable
I am trying to print out multiple plot files (30-100) without having others
print drawings in between the drawings I am printing. If there is a better
way I am more than open to it. I figure at minimum creating plot files
first and then sending them to the printer will be faster than printing them
all at once and waiting for AutoCAD to print each page (because it has to
create the plot first). The method you gave me could be used to accomplish
this, but if there is a way to send all the plt files at once, i'm guessing
it would work even better (maybe?).

Much appreciated,
Aaron

"Chuck Gabriel" wrote in message
news:11A59421ECB117FDCBFE7E9E4794FE0B@in.WebX.maYIadrTaRb...
> I've never heard of one, but I can't imagine why it would be necessary
either.
> What are you trying to accomplish that you can't do with individual plot
files?
>
>
> "Aaron Warnke" wrote in message news:3edb61a7$1@news.qgraph.com...
> > Do you know of any what to "merge" plt files?
> >
> > Thanks,
> > Aaron
>
>
0 Likes
Message 6 of 22

Anonymous
Not applicable
Try it like this. I doubt anybody will be able to slip a plot in between yours.

Store the paths to your plot files in an array of strings and pass it to the
procedure below.

Sub SpoolFiles(ByRef strFiles As Variant, ByRef strPort As String, ByRef
intQuantity As Integer)

Dim objFileSys As FileSystemObject
Dim intIndex As Integer

For intIndex = LBound(strFiles) To UBound(strFiles)
strFiles(intIndex) = Replace(LCase(strFiles(intIndex)), ".dwg", ".plt")
Next intIndex
Set objFileSys = CreateObject("Scripting.FileSystemObject")
Do Until intQuantity = 0
For intIndex = LBound(strFiles) To UBound(strFiles)
objFileSys.GetFile(strFiles(intIndex)).Copy strPort
Next intIndex
intQuantity = intQuantity - 1
Loop
Set objFileSys = Nothing

End Sub



"Aaron Warnke" wrote in message news:3edb6d85$1@news.qgraph.com...
> I am trying to print out multiple plot files (30-100) without having others
> print drawings in between the drawings I am printing. If there is a better
> way I am more than open to it. I figure at minimum creating plot files
> first and then sending them to the printer will be faster than printing them
> all at once and waiting for AutoCAD to print each page (because it has to
> create the plot first). The method you gave me could be used to accomplish
> this, but if there is a way to send all the plt files at once, i'm guessing
> it would work even better (maybe?).
>
> Much appreciated,
> Aaron
0 Likes
Message 7 of 22

Anonymous
Not applicable
Except leave out this part:

> For intIndex = LBound(strFiles) To UBound(strFiles)
> strFiles(intIndex) = Replace(LCase(strFiles(intIndex)), ".dwg",
".plt")
> Next intIndex
0 Likes
Message 8 of 22

Anonymous
Not applicable
Thanks again for your help,

I tried what you mentioned, however the printer is only printing A-size
instead of B-size, and it prints out as a line of text. Here is the
beginning :

81;;17;19:IN;SC;PU;R090 .....

Perhaps you know what I am doing incorrectly?

Thank you,
Aaron

"Chuck Gabriel" wrote in message
news:DB07EB469AD1FF762E134B76B8DC61AE@in.WebX.maYIadrTaRb...
> Except leave out this part:
>
> > For intIndex = LBound(strFiles) To UBound(strFiles)
> > strFiles(intIndex) = Replace(LCase(strFiles(intIndex)), ".dwg",
> ".plt")
> > Next intIndex
>
>
0 Likes
Message 9 of 22

Anonymous
Not applicable
The way I do it is by concatenating the PLT file produced for a postscript
device. Make sure you are producing postscript files because it only works
with them. Many Xerox and HP postscript printer drivers are available to do
that. Since postscript is just text you can append the files to each other
and make one large file. You can use DOS "copy file1.plt + file2.plt +
file3.plt bigjob.plt". With many drawing you may exceed the length of
command line allowed in DOS. You could concatenate the files into
intermediate groups and then the groups into one final one. Use Excel or a
text editor to build your DOS batch file. Another solution is to write
something in VB or other language to take a file list concatenate them and
submit them to a printer. I used a CFileCopy.cls written by Karl E.
Peterson, http://www.mvps.org/vb, in my VB program. We use it to assemble
drawing manuals on demand from a drawing list generated by a design program.
I just checked his web site but couldn't find this VB class anymore. I don't
know if attachments are allowed here so won't post it unless I hear they are
allowed. If you can't find sample code to do it let us know here and I'll
send you my source code. Would it be allowable to post the source code on
autodesk.autocad.customer-files since its not directly AutoCAD related.

LJB
0 Likes
Message 10 of 22

Anonymous
Not applicable
I won't claim that the code I gave you could not possibly be the problem, but I
will say this: That code is part of my production batch plotting routine, and
it has been working without any problems for nigh on three years now 😉

Let us see the rest of your code, and we might be able to figure it out. I
definitely can't make any sense of the output from your printer though.


"Aaron Warnke" wrote in message news:3edc9944@news.qgraph.com...
> Thanks again for your help,
>
> I tried what you mentioned, however the printer is only printing A-size
> instead of B-size, and it prints out as a line of text. Here is the
> beginning :
>
> 81;;17;19:IN;SC;PU;R090 .....
>
> Perhaps you know what I am doing incorrectly?
>
> Thank you,
> Aaron
0 Likes
Message 11 of 22

Anonymous
Not applicable
I used your code verbatim, just added my printer. I wanted to make sure I
got the plotting worked before I meandered off. Is there any chance that
our plt files are different from yours? I wouldn't be surprised if it were
something with our Cannon Printers.

here is the only line(s) I made:

Sub Main()
SpoolFile "C:\Promis-e\PLOT\189743D\ecs0.plt", "\\Htech1\HI090_PCL"
End Sub

"Chuck Gabriel" wrote in message
news:E57EF180D0B1A6E7CE6F6A0FEB03FC85@in.WebX.maYIadrTaRb...
> I won't claim that the code I gave you could not possibly be the problem,
but I
> will say this: That code is part of my production batch plotting routine,
and
> it has been working without any problems for nigh on three years now 😉
>
> Let us see the rest of your code, and we might be able to figure it out.
I
> definitely can't make any sense of the output from your printer though.
>
>
> "Aaron Warnke" wrote in message news:3edc9944@news.qgraph.com...
> > Thanks again for your help,
> >
> > I tried what you mentioned, however the printer is only printing A-size
> > instead of B-size, and it prints out as a line of text. Here is the
> > beginning :
> >
> > 81;;17;19:IN;SC;PU;R090 .....
> >
> > Perhaps you know what I am doing incorrectly?
> >
> > Thank you,
> > Aaron
>
>
0 Likes
Message 12 of 22

Anonymous
Not applicable
Thanks for the tip! I searched around and couldn't find anything on
CFileCopy.cls . It would be great if you could post it on
autodesk.autocad.customer-files.

Thanks!
Aaron
"ljb" <.> wrote in message
news:3361BF7E1F808CF3A5B5CC4E7769673D@in.WebX.maYIadrTaRb...
> The way I do it is by concatenating the PLT file produced for a postscript
> device. Make sure you are producing postscript files because it only works
> with them. Many Xerox and HP postscript printer drivers are available to
do
> that. Since postscript is just text you can append the files to each other
> and make one large file. You can use DOS "copy file1.plt + file2.plt +
> file3.plt bigjob.plt". With many drawing you may exceed the length of
> command line allowed in DOS. You could concatenate the files into
> intermediate groups and then the groups into one final one. Use Excel or a
> text editor to build your DOS batch file. Another solution is to write
> something in VB or other language to take a file list concatenate them and
> submit them to a printer. I used a CFileCopy.cls written by Karl E.
> Peterson, http://www.mvps.org/vb, in my VB program. We use it to assemble
> drawing manuals on demand from a drawing list generated by a design
program.
> I just checked his web site but couldn't find this VB class anymore. I
don't
> know if attachments are allowed here so won't post it unless I hear they
are
> allowed. If you can't find sample code to do it let us know here and I'll
> send you my source code. Would it be allowable to post the source code on
> autodesk.autocad.customer-files since its not directly AutoCAD related.
>
> LJB
>
>
0 Likes
Message 13 of 22

Anonymous
Not applicable
Are you creating your plot files programmatically or manually? If you send the
same file to the plotter from a DOS prompt like this:

copy /b "C:\Promis-e\PLOT\189743D\ecs0.plt" \\Htech1\HI090_PCL

does it work correctly or does it give you garbage like what you showed me
before?


"Aaron Warnke" wrote in message news:3edce9d9$1@news.qgraph.com...
> I used your code verbatim, just added my printer. I wanted to make sure I
> got the plotting worked before I meandered off. Is there any chance that
> our plt files are different from yours? I wouldn't be surprised if it were
> something with our Cannon Printers.
>
> here is the only line(s) I made:
>
> Sub Main()
> SpoolFile "C:\Promis-e\PLOT\189743D\ecs0.plt", "\\Htech1\HI090_PCL"
> End Sub
0 Likes
Message 14 of 22

Anonymous
Not applicable
Sample VB program is posted on autodesk.autocad.customer-files.

"Aaron Warnke" wrote in message news:3edceacb$1@news.qgraph.com...
> Thanks for the tip! I searched around and couldn't find anything on
> CFileCopy.cls . It would be great if you could post it on
> autodesk.autocad.customer-files.
>
> Thanks!
> Aaron
0 Likes
Message 15 of 22

Anonymous
Not applicable
I get the same garbage output. Perhaps I should note that I am using an
E-Cad addition to AutoCad 2000i (Promis-e). Could this be the problem? I
believe you when you say that your code is valid, but I don't understand why
the plt files could be so different. After all it is still AutoCad, isn't
it?

I should know by now, it can never be easy 🙂

"Chuck Gabriel" wrote in message
news:ADEE53AF8FEBB87380DCD1AE61A16374@in.WebX.maYIadrTaRb...
> Are you creating your plot files programmatically or manually? If you
send the
> same file to the plotter from a DOS prompt like this:
>
> copy /b "C:\Promis-e\PLOT\189743D\ecs0.plt" \\Htech1\HI090_PCL
>
> does it work correctly or does it give you garbage like what you showed me
> before?
>
>
> "Aaron Warnke" wrote in message news:3edce9d9$1@news.qgraph.com...
> > I used your code verbatim, just added my printer. I wanted to make sure
I
> > got the plotting worked before I meandered off. Is there any chance
that
> > our plt files are different from yours? I wouldn't be surprised if it
were
> > something with our Cannon Printers.
> >
> > here is the only line(s) I made:
> >
> > Sub Main()
> > SpoolFile "C:\Promis-e\PLOT\189743D\ecs0.plt", "\\Htech1\HI090_PCL"
> > End Sub
>
>
0 Likes
Message 16 of 22

Anonymous
Not applicable
These may be stupid questions, but I'll ask them anyway, to try to help out
here.
1) Previously, have you successfully sent ACAD PLT files to the Canon
printer, or is this the first time you've had to try using PLT files?
2) If answer to #1 is "the former", what method have you used to do this?
IIRC, at my old job, for a while we could use "copy /b" and then something
about the network changed and we had to use a DOS program called PRINTPS or
something like that for Postscript files...
3) If answer to #2 is "the latter", are you able to make a PLT file from
vanilla ACAD and manually send it to the printer? I would get this working
manually before messing with any code.

Just thought I'd contribute what I could... I feel your pain, I know that
trying to plot PS files can really burn up a lot of paper... the worst was
when my old network guys wouldn't give us permission to delete our print
queue jobs, so we would try to kill the job at the printer, even turning the
printer off, and the print server kept trying to restart the failed plot...

James
0 Likes
Message 17 of 22

Anonymous
Not applicable
Thanks for your interest.

I am using AutoCad with an E-Cad application "addition" ,called Promis-e.
Promis-e has it's own print utility that works for the most part. My gripe
is that I may have a 100 page schematic that promis-e will print off one
page at a time. While printing the document everyone and their mother sends
documents to the same printer. When all is said and done, either I have to
pick out everyones drawings or I have to gather all of my drawings that
others have scattered and picked through. I had a bright idea that perhaps
I could create plt files of all the drawings, save them to a directory and
either "merge" them if possible, or send them all to the printer at once.
So far I have been able to make plt files, but I have not been able to
successfully send them to the printer. What is weird is that we use the
same plt files to store in companies viewable network "vault" for POD (print
on demand), using a seporate application. I would use the POD application,
however it is extreamly slow and that the drawings have to be released.

Let me know if I can provide any more information.

Thanks again,
Aaron

"James Belshan" wrote in message
news:8F843F917C4EEA8A47FBF194E146D4DC@in.WebX.maYIadrTaRb...
> These may be stupid questions, but I'll ask them anyway, to try to help
out
> here.
> 1) Previously, have you successfully sent ACAD PLT files to the Canon
> printer, or is this the first time you've had to try using PLT files?
> 2) If answer to #1 is "the former", what method have you used to do this?
> IIRC, at my old job, for a while we could use "copy /b" and then something
> about the network changed and we had to use a DOS program called PRINTPS
or
> something like that for Postscript files...
> 3) If answer to #2 is "the latter", are you able to make a PLT file from
> vanilla ACAD and manually send it to the printer? I would get this
working
> manually before messing with any code.
>
> Just thought I'd contribute what I could... I feel your pain, I know that
> trying to plot PS files can really burn up a lot of paper... the worst was
> when my old network guys wouldn't give us permission to delete our print
> queue jobs, so we would try to kill the job at the printer, even turning
the
> printer off, and the print server kept trying to restart the failed
plot...
>
> James
>
>
0 Likes
Message 18 of 22

Anonymous
Not applicable
From the link below, and assuming you're not using Win 95/98, try:



SendCommand "cmd.exe /C ""copy C:\Promis-e\PLOT\189743D\ecs0.plt
\\server\plotter"""



*note: test one BEFORE putting in a 100-page loop 🙂

http://www.carlsonsw.com/psendplot.htm
http://www.google.com/search?q=send+autocad+plot+files+printer

James
0 Likes
Message 19 of 22

Anonymous
Not applicable
I am not able to see the post, did it get removed?
"ljb" <.> wrote in message
news:EBD727DC78087CACBF5976C589BB25CD@in.WebX.maYIadrTaRb...
> Sample VB program is posted on autodesk.autocad.customer-files.
>
> "Aaron Warnke" wrote in message news:3edceacb$1@news.qgraph.com...
> > Thanks for the tip! I searched around and couldn't find anything on
> > CFileCopy.cls . It would be great if you could post it on
> > autodesk.autocad.customer-files.
> >
> > Thanks!
> > Aaron
>
>
0 Likes
Message 20 of 22

Anonymous
Not applicable
When I try to copy plot files from dos, I have found that the plot file
prints as a line of text for some reason. Do you have any remidy for this?

"James Belshan" wrote in message
news:CD252E71B5691C9197944A57CE1AF2BD@in.WebX.maYIadrTaRb...
> From the link below, and assuming you're not using Win 95/98, try:
>
>

>
> SendCommand "cmd.exe /C ""copy C:\Promis-e\PLOT\189743D\ecs0.plt
> \\server\plotter"""
>
>

>
> *note: test one BEFORE putting in a 100-page loop 🙂
>
> http://www.carlsonsw.com/psendplot.htm
> http://www.google.com/search?q=send+autocad+plot+files+printer
>
> James
>
>
0 Likes