vlax-get-or-create-object


(vlax-get-or-create-object COM-Id)

This function returns an existing instance of the COM server object identified by COM-Id or creates a new instance if the COM server is actually not running.

Arguments

COM-Id  (string) identifies the COM server object by its name

Return

VLA-OBJECT;  the COM server object, or NIL if instantiation fails

Example

(setq fso (vlax-get-or-create-object "Scripting.FileSystemObject"))
#<VLA-OBJECT IFileSystem3 0000000027623520>

Remarks

this function tries to first connect to an existing instance of the specified COM server object;
if such instance is actually not available, a new COM server object is instantiated (like with (vlax-create-object) function
see (vlax-create-object) function
see (vlax-get-object) function



©  Bricsys NV. All rights reserved.