CADRaster programming interface

CADRaster programming interface is based on ActiveX Automation, a technology developed by Microsoft and based on the COM (Component Object Model) architecture. You can use CADRaster automation interface to customize CADRaster and to automate repetitive tasks. Through automation, CADRaster exposes programmable objects, described by the CADRaster Object Model, which can be created, edited, and manipulated by other applications. Any application that can access the CADRaster Object Model is an automation controller.

The most common tool used for manipulating another application using automation is Visual Basic. But you can use other automation controllers, such as Delphi or VBScript.

CADRaster object model

When you manipulate CADRaster objects, you always start with the Application object. If you are using Microsoft Visual Basic for Applications (VBA) in AutoCAD, there is a reference to the AutoCAD object library set by default. In order to use CADRaster object library you must first set a reference to the CADRaster object library by using the References dialog box. If you have set a reference to the CADRaster object library, you attach to an instance of a CADRaster Application object by using the GetObject keyword as follows:

Dim cadrApp As CADRaster.Application
Set cadrApp = GetObject(, ”CADRaster.Application”)

There also exists object that supports file actions (similar to CADRaster’s ExtFileName object). This object has programmatic identifier "CADRaster.FileName" and can be created directly with the CreateObject or New functions.

loading table of contents...