vlax-create-object (AutoLISP/ActiveX)

Creates a new instance of an application object

Supported Platforms: Windows only

Syntax

(vlax-create-object prog-id)
prog-id

Type: String

Programmatic identifier of the desired ActiveX object. The format of prog-id is

<Vendor>.<Component>.<Version>

For example:

AutoCAD.Drawing.20

Return Values

Type: VLA-object

The application object.

Remarks

Use vlax-create-object when you want a new instance of an application to be started, and an object of the type specified by <Component> (see the argument description) to be created. To use the current instance, use vlax-get-object. However, if an application object has registered itself as a single-instance object, only one instance of the object is created, no matter how many times you call vlax-create-object.

Examples

Create an instance of a Microsoft Excel application:

(vlax-create-object "Excel.Application")
#<VLA-OBJECT _Application 0017b894>