×
Menu
Index

AcroPlot Standard API

The Standard API designed for users who would like to create their own toolbars or menus to access AcroPlot's basic functionality with predefined output filenames.
 
All AcroPlot Suite licenses can access some of the Standard AcroPlot API from inside of AutoCAD to provide predefined output for where they would like the files created to be saved. 
 
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.
 

Notes:

1.
If the sOutputFilename exists the PDF files will be merged to it.
2.
If the sOutputFilename is read-only or is opened in Adobe Acrobat or Adobe Reader the conversion will fail.
3.
If the RestoreSettings is not called or provided a proper settings name then the last used settings in AcroPlot Jr. will be used.
4.
If you are merging multiple layouts or drawings into the same PDF make sure that you turn off the OpenPDF setting by using:
SetSetting "AcroPlotSettings.OpenPDF" 0
 

The Standard API Calls are:

AcroPlotJCurrent(ByVal oAcadApp As AcadApplication) As Boolean
This method will convert the current layout (either modelspace or paperspace) to PDF.
 
AcroPlotJModel(ByVal oAcadApp As AcadApplication) As Boolean
This method will convert the modelspace layout to PDF.
 
AcroPlotJPaper(ByVal oAcadApp As AcadApplication) As Boolean
This method will convert the all of the paperspace layouts in the tab order to PDF.
 
AcroPlotJView(ByVal oAcadApp As AcadApplication) As Boolean
This method will convert the modelspace layout to PDF.
 
 
GetAvailableSettings(ByVal sSettingName As String, ByRef sRet As String) As Long
This method will return a string array of the available setting names based on the following 3 categories that can be passed in for sSettingCategory
AcroPlotSettings
AcroPlotPrinter
AcroPlotAutoCAD
 
 
GetSetting(ByVal sSettingName As string, ByRef vValue As Variant) As Long
This method allows you to get the current value of the setting name that you passed in.  If the setting name does not exist it will return 0.  If it does exist it will return 1.
 
 
Init() As Long
This method initializes the AcroPlot API.
 
Quit()
This method must be called to release the AcroPlot Application Object properly.
 
RestoreSettings(ByVal sSettings As String) As Long
This method restores a named setting that you had previously saved using AcroPlot or AcroPlot Jr.
 
 
RunAutoCADFull(ByVal oAcadApp As Object) As Boolean
Runs the AcroPlot Program from inside of AutoCAD.  Useful if you want to provide your own menu routines.
 
 
RunAutoCADJunior(ByVal oAcadApp As Object) As Boolean
Runs the AcroPlot Junior Program from inside of AutoCAD.  Useful if you want to provide your own menu routines.
 
 
RunAutoCADPro(ByVal oAcadApp As Object) As Boolean
Runs the AcroPlot Pro Program from inside of AutoCAD.  Useful if you want to provide your own menu routines.
 
SetOutputFilename(ByVal sOutputFilename As String) As Long
This method allows you to set the output filename. The user will still be prompted for the filename unless you are an AcroPlot Auto customer or an AcroPlot Pro customer with 25 or more licenses.
 
 
SetOutputFormtID(ByVal lOutputFormat As Long) As Long
This method allows you to set the output format to use.  While the default output format is automatically set when you call the SetOutputFIlename there are some formats like Tiff that can be color or monochrome as well as different output DPI. So you must call the SetOutputFormatID AFTER the SetOutputFilename.
The valid output formats values are:
   pdf = 1
   dwf6 = 2
  'reserved for future use
   BMP = 4
   CAL = 5
   GIF = 6
   gp4 = 7
   JPG = 8
   PNG = 9
   tif = 10 (color tiff at 100 dpi)
   tifmono = 11 (monochrome group 3 fax format tiff at 100 dpi)
   tifmono200 = 12 (monochrome group 3 fax format tiff at 200 dpi)
   tifmono300 = 13 (monochrome group 3 fax format tiff at 300 dpi)
   tifmono400 = 14 (monochrome group 3 fax format tiff at 400 dpi)
   tif200 = 15 (color tiff at 200 dpi)
   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 for future use
   rasterpdf100 = 30    'not supported reserved for future use
   rasterpdf150 = 31    'not supported reserved for future use
   rasterpdf200 = 32    'not supported reserved for future use
   rasterpdf300 = 33    'not supported reserved for future use
   rasterpdf400 = 34    'not supported reserved for future use
   rasterpdfmono100 = 35    'not supported reserved for future use
   rasterpdfmono150 = 36    'not supported reserved for future use
   rasterpdfmono200 = 37    'not supported reserved for future use
   rasterpdfmono300 = 38    'not supported reserved for future use
   rasterpdfmono400 = 39    'not supported reserved for future use
   tif600 = 40    'not supported reserved for future use
   tifmono600 = 41    (monochrome group 3 fax format tiff at 600 dpi)  'not supported reserved for future use
   dwfpdftifmono600 = 42    'not supported reserved for future use
   pdftifmono600 = 43    'not supported reserved for future use
   rasterpdf600 = 44    'not supported reserved for future use
   rasterpdfmono600 = 45    'not supported reserved for future use
   cal200 = 46    'not supported reserved for future use
   cal400 = 47    'not supported reserved for future use
   cal600 = 48    'not supported reserved for future use
   gp4200 = 49    'not supported reserved for future use
   gp4400 = 50    'not supported reserved for future use
   gp4600 = 51    'not supported reserved for future use
   cal300 = 52    'not supported reserved for future use
   gp4300 = 53    'not supported reserved for future use
   dwfx = 54    'not supported reserved for future use
 
SetSetting(ByVal sSettingName As String, ByVal vValue As Variant) As Variant
This method allows you to override the settings from the RestoreSettings.  See below for the currently supported settings.
 
Any setting in the AcroPlotSettings.ini file can be used used.  You can typically find the file in the C:\Users\[USERNAME]\AppData\Roaming\CADzation\AcroPlot\AcroPlotsettings.ini location by using the name on the left as the SettingName like acroplotsettings_bookmarkacadblocknames.
 

Some common settings are:

 
sSettingName
Type
vValues
BackgroundPlot
Integer or Long
Controls if AutoCAD uses background plotting.  On some systems like Server 2008 we sometimes need to enable background plotting to driver AutoCAD properly.  Usually though you can leave this set to -1.
-1 = Let us control background plotting needs
0 = Force off background plotting in AutoCAD
1 = Force on background plotting in AutoCAD
 
DWGCreateIndividualFiles
Integer or Long
(True/False)
-1 = Create an individual file for each layout being converted
0 = Create a single file containing all layouts
 
 
 
 
 
 
 
 
 
AcroplotSettings.BookmarkAcadBlocknames
String
 
 
AcroplotSettings.BookmarkAcadDrawingText
String
 
 
AcroplotSettings.BookmarkAcadLayoutText
String
 
 
AcroplotSettings.BookmarkDrawing
Integer or Long
(True/False)
-1 = Add bookmarks into the PDF.
0 = Do not add Bookmarks into the PDF
 
AcroplotSettings.BookmarkDrawingIndividual
Integer or Long
(True/False)
-1 = Add drawing level bookmark to the PDF.
0 =Do not add a drawing level bookmark to the PDF.
 
AcroplotSettings.BookmarkDrawingProperties
Integer or Long
(True/False)
-1 = Add bookmarks for the drawing properties to the PDF
0 = Do not add bookmarks for the drawing properties to the PDF.
 
AcroplotSettings.BookmarkKeep
Integer or Long
(True/False)
-1 = If an existing PDF file is being merged keep it's existing bookmarks instead of adding a new one.
0 = Remove all bookmarks and add in our calculated bookmark when merging PDF files.
 
AcroplotSettings.BookmarkLayout
Integer or Long
(True/False)
-1 = Add a layout level bookmark into the PDF file.
0 = Do not add a layout level bookmark into the PDF file.
 
AcroplotSettings.BookmarkLength
Integer or Long
Also set the BookmarkUseLength to limit the number of characters in a bookmark,
Maximum number of characters for the bookmark length.
 
AcroplotSettings.BookmarkMainText
String
 
 
AcroplotSettings.BookmarkPDFText
String
 
 
AcroplotSettings.BookmarkShowOnOpen
Integer or Long
(True/False)
-1 = Show the bookmarks pane in the PDF when it is opened
0 = Do not force showing the bookmarks pane
 
AcroplotSettings.BookmarkUse
Integer or Long
(True/False)
-1 = Add bookmarks to the PDF
0 = Do not add bookmarks
 
AcroplotSettings.BookmarkUseLength
Integer or Long
(True/False)
Also set the BookmarkLength to limit the number of characters in a bookmark,
-1 = Limit the length of the bookmark to the specified number of characters as defined by the BookmarkLength
0 = Do not limit the length of bookmarks.
 
AcroplotSettings.ConvertWith
String
This setting would only be used by the AcroPlot Advanced API users so please see that documentation for more information.
 
AcroplotSettings.CustomPlotScale
Double > 0.0
Also set  the PlotScale = -101 setting when using the CustomPlotScale
1.0 = Full Size
0.5 = Half Size
 
AcroplotSettings.DwgOrientation
Integer or Long
1 = Portait
2 = Landscape
3 = Automatic
 
AcroplotSettings.DwgPaperSize
Integer or Long
1 = Letter
5 = Legal
3 = Tabloid
24 = C size sheet
25 = D size sheet
26 = E size sheet
131 = Arch-A
132 = Arch-B
264 = Arch-C
265 = Arch-D
135 = Arch-E
266 = Arch-E1
360 = 22x33
259 = A0
260 = A1
66 = A2
8 = A3
9 = A4
11 = A5
70 = A6
12 = B4
13 = B5
361 = USER1
362 = USER2
363 = USER3
364 = USER4
365 = USER5
366 = USER6
367 = USER7
368 = USER8
369 = USER9
370 = Size saved in drawing
371 = Full Offset
 
AcroplotSettings.EnablePc3Support
Integer or Long
(True/False)
-1 = Use pc3 files
0 = Do not use pc3 files
 
AcroplotSettings.DwfoutIncludeLayer
Integer or Long
(True/False)
-1 = Include layer information
0 = Do not include layer information
 
AcroplotSettings.LinesMerge
Integer or Long
(True/False)
-1 = Use lines merge
0 = Do not use lines merge
Note: Not allowed with PDF/A-1a and PDF-A-1b formats
 
AcroplotSettings.OpenPDF
Integer or Long
(True/False)
-1 = Open
0 = Do not open
 
AcroplotSettings.ReproBrightness
Integer or Long
-100 to 100 (Default = 0)
Brightness setting to control making monochrome tiff files lighter or darker.
 
AcroplotSettings.ReproDitherType
Integer or Long
Used for converting files to monochrome tiff formats
 
AcroplotSettings.ReproScale
Double
Scale to use when converting to monochrome tiff files.  >0.0 where 1.0 is full size and 0.5 is half size
 
AcroplotSettings.UseInternalViewerForPlotting
Integer or Long
(True/False)
-1= Use the internal viewer instead of AutoCAD for plotting
0 = Use AutoCAD if installed for plotting
 
 
 
 
 
 
 
AcroplotAutoCAD.PlotScale
Integer or Long
0 = Scale to Fit
16 = 1:1 Full Size
100 = Saved
-101 = Custom (Also set the AcroPlotSettings.CustomPlotScale)
 
AcroplotAutoCAD.PlotType
Integer or Long
1 = Extents
2 = Limits
3 = View
4 = Window
5 = Layout,
-100 = Use saved Settings
 
AcroplotAutoCAD.PlotView
String
The view name to plot if PlotType = 3
 
 
 
 
 
 
 
AcroplotPrinter.Allow128Assembly
Integer or Long
(True/False)
-1=When Allow128Bit is set to 2 this will allow users to assemble (add) PDF files to this one.
0=When Allow128Bit is set to 2 this will restrict users from doing it.
 
AcroplotPrinter.Allow128Bit
Integer or Long
0=Do not add password security
1=Add 40 bit password security
2=Add 128 bit password security
Note: Not allowed with PDF/A-1a and PDF-A-1b formats
 
AcroplotPrinter.Allow128Extract
Integer or Long
(True/False)
-1=When Allow128Bit is set to 2 this will allow users to extract from the PDF file.
0=When Allow128Bit is set to 2 this will restrict users from doing it.
 
AcroplotPrinter.Allow128InteractiveForms
Integer or Long
(True/False)
-1=When Allow128Bit is set to 2 this will allow users to fill in interactive forms.
0=When Allow128Bit is set to 2 this will restrict users from doing it.
 
AcroplotPrinter.Allow128PrintLow
Integer or Long
(True/False)
-1=When Allow128Bit is set to 2 this will allow users to only print low resolution output if the AllowPrint is also enabled.
0=When Allow128Bit is set to 2 this will restrict users from doing it.
 
AcroplotPrinter.AllowChanges
Integer or Long
(True/False)
-1=When Allow128Bit is set to 1 or 2 this will allow users to make changes to the PDF.
0=When Allow128Bit is set to 1 or 2 this will restrict users from doing it
 
AcroplotPrinter.AllowCopy
Integer or Long
(True/False)
-1=When Allow128Bit is set to 1 or 2 this will allow users to copy info from PDF.
0=When Allow128Bit is set to 1 or 2 this will restrict users from doing it
 
AcroPlotPrinter.AllowNotes
Integer or Long
(True/False)
-1=When Allow128Bit is set to 1 or 2 this will allow users to add annotation to the PDF.
0=When Allow128Bit is set to 1 or 2 this will restrict users from doing it
 
AcroPlotPrinter.AllowPrint
Integer or Long
(True/False)
-1=When Allow128Bit is set to 1 or 2 this will allow users to print the PDF.
0=When Allow128Bit is set to 1 or 2 this will restrict users from doing it
 
AcroPlotPrinter.Author
String
Specifies the author for the PDF Document Properties 
 
AcroplotPrinter.GrayScale
Integer or Long
0 = Color
1 = Monochrome
2 = Grayscale
 
AcroPlotPrinter.Justification
 
 
 
AcroPlotPrinter.Keywords
String
Specifies the keywords for the PDF Document Properties 
 
AcroPlotPrinter.Orientation
 
 
 
AcroPlotPrinter.PasswordAuthor
String
When Allow128Bit is set to 1 or 2 this will set the Author password to the text you entered.  This is required when Allow128Bit is set to 1 or 2.
 
AcroPlotPrinter.PasswordUser
String
When Allow128Bit is set to 1 or 2 this will set the User password to the text you entered.  This is optional and if an empty string then the users will not have to enter a password to open the PDF but the security permissions will still be set.
 
AcroPlotPrinter.PDFFormat
 
PDF Format to use
 
AcroPlotPrinter.Resolution
Long
Output Resolution of the PDF.
Available values are:
100, 150, 300, 400, 600, 1200
 
AcroPlotPrinter.Subject
String
Specifies the subject for the PDF Document Properties
 
AcroPlotPrinter.Title
String
Specifies the title for the PDF Document Properties
 
AcroplotPrinter.Watermark
Integer or Long
(True/False)
-1=Add a watermark
0=Do not add a watermark
 
AcroPlotPrinter.WatermarkFont
Integer or Long
Font to use for the Watermark if it is a text watermark
1=Arial
2=Arial Bold
3=Arial Bold and Italic
4=Arial Italic
5=Courier
6=Courier Bold
7=Courier Bold and Italic
8=Courier Italic
9=Times Roman
10=Times Roman Bold
11=Times Roman Bold and Italic
12=Times Roman Italic
 
AcroplotPrinter.WatermarkFontAngle
Integer or Long
Angle from 0 to 360 degrees
 
AcroplotPrinter.WatermarkFontColor
Long
Long OLE color value for the color
 
AcroplotPrinter.WatermarkFontHorizPos
Integer or Long
Distance to offset the watermark in the horizontal direction.  Distance is a long value expressed in 1/10th of a mm.  Example:1 inch would be a value of 254
 
AcroplotPrinter.WatermarkFontSize
Integer or Long
Size of font in points
 
AcroplotPrinter.WatermarkFontVertPos
Integer or Long
Distance to offset the watermark in the vertical direction.  Distance is a long value expressed in 1/10th of a mm.  Example:1 inch would be a value of 254
 
AcroplotPrinter.WatermarkFontX
Integer or Long
Horizonatal justification for the watermark
0=Left
1=Centered
2=Right
 
AcroplotPrinter.WatermarkFontY
Integer or Long
Vertical justification for the watermak
0=Bottom1
=Middle
2=Top
 
AcroplotPrinter.WatermarkOnTop
Integer or Long
(True/False)
-1=Place the watermark on the top
0=Place the watermark below all objects
 
AcroplotPrinter.WatermarkOpacity
Double
Opacity (transparency) for the text or image
0.0 (invisible) to 100.0 (fully visible)
Note: Not allowed with PDF/A-1a and PDF-A-1b formats
 
AcroplotPrinter.WatermarkText
String
Text string to use for the watermark or the full filename if you want to use an image file for the watermark.
Image formats currently supported are bmp and gif.
 
 
 
 

The Following API Calls would normally not be used but are included for your reference:

AcroPlotAbout(ByVal oAcadApp as Object)
This method will display the AcroPlot About dialog box.
 
AcroPlotAboutJunior(ByVal oAcadApp as Object)
This method  will display the AcroPlot Junior About dialog box
 
AcroPlotPurchase()
This method opens the AcroPlot Purchase page in your default web browser.
 
AcroPlotSetup(ByVal oAcadApp as Object)
This method will display the AcroPlot Main Settings dialog.
 
EmailSales()
This method opens an email to sales@cadzation.com in your default email program.
 
EmailSalesJunior()
This method opens an email to sales@cadzation.com in your default email program
 
EmailSupport()
This method opens an email to support@cadzation.com in your default email program
 
EmailSupportJunior()
This method opens an email to support@cadzation.com in your default email program
 
GotoWebsite()
This method opens the CADzation website in your default web browser.
 
OpenHelp()
This method opens the AcroPlot help file
 
OpenHelpJunior()
This method opens the AcroPlot help file