AcroPlot Advanced Command LineAcroPlot Command Line access requires an AcroPlot Auto license and is designed to tie into document management systems as a conversion engine that is easily implemented with custom scripting or batch routines.
To create or convert files using the command line mode API or ActiveX automation mode interface, it is required to purchase a license of AcroPlot Auto for each server running the process. If there will be additional PC's running AcroPlot Suite licenses or any of its components, then it is also required to purchase the number licenses needed in addition to the AcroPlot Auto server license.
There are several command line switches that can be passes
/i= Input filename for the AutoCAD drawing. Filename should be wrapped with quotation marks.
/o= Output filename or folder name.Filename should be wrapped with quotation marks.
This should be the full pathname but there are a few shotcuts that can be used.
If you want to create a PDF with the same name as the input then do not specify
this and instead set the /f Output format value
NOTE: If you specify an output file that already exists for PDF and DWF files the file will be appended to the end of the existing file.
/b= Create Individual Files
0 = Create a single file - Default
1 = Create one file per layout
/s= Settings - Saved Setting name to use from AcroPlot Pro
/t= Type to plot from
0 = Current layout either modelspace or paperspace
1 = Modelspace
2 = Current Paperspace layout
3 = All Paperspace layouts in order
/v= Viewer - Use the viewer for plotting
0 = Use AutoCAD
1 = Use the internal viewer
2 = Use AutoCAD but leave open (Not implemented yet)
/n= No wait - Does not wait for the conversion to finish and returns
control back to the command line so it does not tie up the
program calling it.
0 = Wait for the conversion to finish
1 = Do not wait for the conversion to finish. User will check the registry settings to find out when the conversion is finished.
/h= Creates a prompts to see what values are being passed in. Used for testing only
1 = Stop executions and display message box for debugging
/f= AcroPlot Output Format - Needed for file extensions like tif which could have
multiple different types of output formats
NOTE: NOT ALL OUTPUT FORMATS WORK YET FROM THE COMMAND LINE
pdf = 1
dwf6 = 2
dwf5 = 3 'not supported any longer
bmp = 4
cal = 5
gif = 6
gp4 = 7
jpg = 8
png = 9
tif = 10
tifmono = 11
tifmono200 = 12
tifmono300 = 13
tifmono400 = 14
tif200 = 15
tif300 = 16 'not supported reserved for future use
tif400 = 17 'not supported reserved for future use
dwfpdf = 18
dwfpdftif = 19
dwfpdftifmono = 20
dwfpdftifmono200 = 21
dwfpdftifmono300 = 22
dwfpdftifmono400 = 23
pdftif = 24
pdftifmono = 25
pdftifmono200 = 26
pdftifmono300 = 27
pdftifmono400 = 28
'reserved
rasterpdf100 = 30
rasterpdf150 = 31
rasterpdf200 = 32
rasterpdf300 = 33
rasterpdf400 = 34
rasterpdfmono100 = 35
rasterpdfmono150 = 36
rasterpdfmono200 = 37
rasterpdfmono300 = 38
rasterpdfmono400 = 39
unknown = -100
NOTE: NOT ALL OUTPUT FORMATS WORK YET FROM THE COMMAND LINE
/d= Debug Log Filename Creates a debug log file for the conversion /d="C:\SomeDir\SomeLogName.txt"
NOTE: Any existing file with this name is deleted each time you run the AcroPlot.exe
/z= Set an Setting that is not directly supported Example /z="AcroPlotPrinter.Grayscale=1" to create for a monochrome PDF.
/e= Error Log Filename - Creates an error log file for any errors
NOTE: The error log is never deleted. Any new errors will be appended to the end of the log file. If you want to watch for an error file to be created either use a unique name each time or delete out the existing error file with your own code prior to running the AcroPlot.exe
This file is also a semicolon separated file which you could bring into Excel to analyze
/a= Do not show the AcroPlot Monitor
0 = Do not show the AcroPlot Monitor (monitor still runs in background)
1 = Show the AcroPlot Monitor
2 = Do not show the AcroPlot Monitor and close when finished
3 = Show the AcroPlot Monitor and close when finished
Example of converting DWG to PDF.AcroPlot.exe /i="C:\File.dwg" /o="C:\File.pdf" /s="DWGToPDF" /b=0 /t=3
In this example we are using the setting named DWGToPDF that we had already defined in AcroPlot Pro. By passing the /b=0 command line switch it will merge all layouts into a single PDF named C:\File.pdf. Also the /t=3 tells us to convert all the paperspace layouts.
Example of converting 3 DWG files to a single PDF.AcroPlot.exe /i="C:\File1.dwg" /o="C:\File.pdf" /s="DWGToPDF" /b=0 /t=3
AcroPlot.exe /i="C:\File2.dwg" /o="C:\File.pdf" /s="DWGToPDF" /b=0 /t=3
AcroPlot.exe /i="C:\File3.dwg" /o="C:\File.pdf" /s="DWGToPDF" /b=0 /t=3
In this case you would want to make sure that the output pdf file does not exist. Then the first DWG will be created as the output file. The next two since you are passing the same output filename to us we will append those onto the existing PDF so you will end up with a single PDF of the 3 drawings.
Also in this example we are using the setting named DWGToPDF that we had already defined in AcroPlot Pro. By passing the /b=0 command line switch it will merge all layouts into a single PDF named C:\File.pdf. Also the /t=3 tells us to convert all the paperspace layouts.
Example of Merging 2.PDF to 1.PDFAcroPlot.exe /i="C:\2.pdf" /o="C:\1.pdf"
Example of Merging 1.pdf, 2.pdf, and 3.pdf together to a new filenameAcroPlot.exe /i="C:\1.pdf" /o="C:\NewFilename.pdf"
AcroPlot.exe /i="C:\2.pdf" /o="C:\NewFilename.pdf"
AcroPlot.exe /i="C:\3.pdf" /o="C:\NewFilename.pdf"
Example of Adding a Text Watermark to a PDFNOTE: You must specify a new filename otherwise it will try to append the file to itself.
NOTE: When enabling watermarks you should either use a saved setting name in which you have all of your watermark settings how you want them or pass all the parameters to the AcroPlot.exe to get consistent results. Otherwise it might use the last settings you had previously used.
AcroPlot.exe /i="C:\1.pdf" /o="C:\WatermarkedFile.pdf" /s="SavedSettingsForWatermark"
or
AcroPlot.exe /i="C:\1.pdf" /o="C:\WatermarkedFile.pdf" /z="AcroPlotPrinter.Allow128Bit=1" /z="AcroPlotPrinter.Watermark=1" /z="AcroPlotPrinter.WatermarkFont=2" /z="AcroPlotPrinter.WatermarkFontAngle=0" /z="AcroPlotPrinter.WatermarkFontColor=255" /z="AcroPlotPrinter.WatermarkFontHorizPos=1" /z="AcroPlotPrinter.WatermarkFontSize=12" /z="AcroPlotPrinter.WatermarkFontVertPos=2" /z="AcroPlotPrinter.WatermarkFontX=0" /z="AcroPlotPrinter.WatermarkFontY=254" /z="AcroPlotPrinter.WatermarkOnTop=1" /z="AcroPlotPrinter.WatermarkText=||PAGE|| of ||PAGETOTAL||"
The above sample would located a red text watermark centered horizontally and 1 inch (25.4 mm) above the bottom of the page using a font size of 12 points. For more on the various settings please see the AcroPlot Standard API documentation.
Example of Adding an Image Watermark to a PDFNOTE: You must specify a new filename otherwise it will try to append the file to itself.
NOTE: When enabling watermarks you should either use a saved setting name in which you have all of your watermark settings how you want them or pass all the parameters to the AcroPlot.exe to get consistent results. Otherwise it might use the last settings you had previously used.
NOTE: Currently bmp and gif images are supported.
AcroPlot.exe /i="C:\1.pdf" /o="C:\WatermarkedFile.pdf" /s="SavedSettingsForImageWatermark"
or
AcroPlot.exe /i="C:\1.pdf" /o="C:\WatermarkedFile.pdf" /z="AcroPlotPrinter.Allow128Bit=1" /z="AcroPlotPrinter.Watermark=1" / /z="AcroPlotPrinter.WatermarkFontAngle=0" /z="AcroPlotPrinter.WatermarkFontHorizPos=1" /z="AcroPlotPrinter.WatermarkFontVertPos=2" /z="AcroPlotPrinter.WatermarkFontX=0" /z="AcroPlotPrinter.WatermarkFontY=254" /z="AcroPlotPrinter.WatermarkOnTop=1" /z="AcroPlotPrinter.WatermarkText=C:\SomeImageFile.gif"
The above sample would located the gif image centered horizontally and 1 inch (25.4 mm) above the bottom of the page using a font size of 12 points. For more on the various settings please see the AcroPlot Standard API documentation.
Example of Adding Password Protection to a PDFNOTE: You must specify a new filename otherwise it will try to append the file to itself.
NOTE: When enabling Password Protection you should either use a saved setting name in which you have all of your security settings how you want them or pass all the parameters to the AcroPlot.exe to get consistent results. Otherwise it might use the last settings you had previously used.
AcroPlot.exe /i="C:\1.pdf" /o="C:\PasswordProtectedFile.pdf" /s="SavedSettingsWithPassword"
or
AcroPlot.exe /i="C:\1.pdf" /o="C:\PasswordProtectedFile.pdf" /z="AcroPlotPrinter.Allow128Bit=2" /z="AcroPlotPrinter.PasswordAuthor=AuthorPassword" /z="AcroPlotPrinter.PasswordUser=UserPassword" /z="AcroPlotPrinter.Allow128Assembly=-1" /z="AcroPlotPrinter.Allow128BitExtract=0" /z="AcroPlotPrinter.Allow128BitInteractiveForms=-1" /z="AcroPlotPrinter.Allow128BitPrintLow=-1" /z="AcroPlotPrinter.AllowChanges=0" /z="AcroPlotPrinter.AllowCopy=-1" /z="AcroPlotPrinter.AllowNotes=-1" z="AcroPlotPrinter.AllowPrint=-1"
|