Script to run PUBLISH got "Invalid file."

Script to run PUBLISH got "Invalid file."

wesbird
Collaborator Collaborator
1,730 Views
6 Replies
Message 1 of 7

Script to run PUBLISH got "Invalid file."

wesbird
Collaborator
Collaborator

I want to create PDF from DWG file, for each DWG file, some layouts will print out as PDF file, not all layouts. I also like to use DWG TrueView to do it, because it's free.


Here is how I goes,
1. I start from AutoCAD, I run PUBLISH, pick the layout I like to use, change file type to Single-sheet file, output as PDF. save sheet list DSD file. it works
2. then I set FILEDIA = 0, run -PUBLISH, enter the DSD file I just created, it works too.
3. now I create a scr file, just like:

-PUBLISH
"C:\B\CLGRAB01-001A-FP01.dsd"

in AutoCAD, I run SCRIPT, enter the scr file I just created, I got error message like:

Command: SCRIPT
Enter script file name <C:\B\CLGRAB01-001A-FP00.scr>: c:\b\clgrab01-001a-fp01.scr
Command: -PUBLISH
Enter name of sheet list <C:\b\clgrab01-001a-fp01.dsd>: "C:\B\CLGRAB01-001A-FP01.dsd"
C:\b\clgrab01-001a-fp01.dsd
Invalid file.
Please verify the correct path was given.


I already tried this for 3 different files and locations. all came the same error. What could be wrong.

 

 

 

Thanks

Wes

Windows 10 64 bit, AutoCAD (ACA, Map) 2023
0 Likes
Accepted solutions (1)
1,731 Views
6 Replies
Replies (6)
Message 2 of 7

paullimapa
Mentor
Mentor
Accepted solution

Have you tried putting into the script file the name of the sheet list file without the quotes, ie:

 

-Publish

C:\B\CLGRAB01-001A-FP01.dsd

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


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

leigh.menzel
Explorer
Explorer

How can you create the DSD file from Trueview in the first place though?  It seems there is a way to do it, but I can't find doco. on this anywhere.  Does anyone have any ideas on how to automate the creation of a DSD file from Trueview (like just going into the PUBLISH command and then cancelling out and selecting Yes to save the DSD file?)

 

0 Likes
Message 4 of 7

paullimapa
Mentor
Mentor

Just click on the Save button

paullimapa_0-1746412576312.png

 

 


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

leigh.menzel
Explorer
Explorer

Paul.  Thanks for the feedback, but I want to do it automatically (no user intervention/clicking).  A way to open the PUBLISH command without having to specify a DSD file first.  If one specifies -PUBLISH in the SCR (/b script) file, Trueview insists on requiring a DSD file to open the Publish command, which is what I don't have yet.

0 Likes
Message 6 of 7

Sea-Haven
Mentor
Mentor

There is some posts about making a DSD file via lisp, but you would have to make it 1st then it should be available for Trueview. Trueview does not have a crystal ball.

0 Likes
Message 7 of 7

leigh.menzel
Explorer
Explorer

Yep thanks, I am working on that now.  Just can't believe it's something that is so easy to do manually in Trueview and yet seems impossible to automate.  I say "seems" because nothing is impossible!

0 Likes