vlax-create-object

AutoCad AutoLISP Functions

 
vlax-create-object
 
 
 

Creates a new instance of an application object

(vlax-create-object prog-id)

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.

Arguments

prog-id

A string containing the programmatic identifier of the desired ActiveX object. The format of prog-id is

<Vendor>.<Component>.<Version>

For example:

AutoCAD.Drawing.15

Return Values

The application object (VLA-object).

Examples

Create an instance of a Microsoft Excel application:

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