Script with -Publish vs +Publish

Script with -Publish vs +Publish

jsebclark_SDG
Enthusiast Enthusiast
390 Views
5 Replies
Message 1 of 6

Script with -Publish vs +Publish

jsebclark_SDG
Enthusiast
Enthusiast

I have a simple script that uses the Publish command to control the printing options.  I open the file and then run the script.  The script creates a DSD file and then invokes the -publish command with this DSD file.  When I do this the command executes correctly without any user intervention, but the command doesn't use the opened file to print from.  It opens the file again separately and prints from that.  When I do the same thing as above but use the +publish command, I get the dialog box.  This would require user intervention.  But using this method the publish command uses the opened file for the print.

 

I really want the functionality of the -publish with no user input but printing the already opened file.

Is there something that I can do to get that functionality?

 

The reason why this is a problem is because I am opening files to print and they need to regenerate linked schedules.  So I want to use the file that is open and already regenerated to publish.  When I use -publish it opens a new version of the file and the schedules don't regenerate and are completely missing when the publish command finishes.

0 Likes
Accepted solutions (1)
391 Views
5 Replies
Replies (5)
Message 2 of 6

paullimapa
Mentor
Mentor

Since you want to actually print the drawing file you currently have opened, is there a reason why you don't just create & save a script file with all the PLOT command parameters and then just run that SCRIPT instead of using the PUBLISH script?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 6

jsebclark_SDG
Enthusiast
Enthusiast

I am using the PUBLISH command because I am actually creating PDFs of the sheets I am printing.  I have control over output location and file name with the publish command.  I am not aware of being able to control those two items programmatically using the PLOT command.  Maybe you know how to do that?

0 Likes
Message 4 of 6

paullimapa
Mentor
Mentor
Accepted solution

Script files are easy to create. It's just a text file saved with .SCR extension that contains lines of AutoCAD commands.

For the PLOT command you can follow this on the screen by entering at the command line: -PLOT

Assuming you're plotting from Layout tab, I've attached a sample script file that I've created specifically for sample drawing Mechanical - Text and Tables.dwg

See if you can figure out how to modify it to meet your needs. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 6

jsebclark_SDG
Enthusiast
Enthusiast

Thank you!  That is very helpful.  I will look into further.  I think I might be able to make it work for what I need it to do.  You saved me soo much time.  Thanks again!

0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor

You are very welcome...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes