Imports information from a type library
(vlax-import-type-library :tlb-filename filename [:methods-prefix mprefix :properties-prefix pprefix :constants-prefix cprefix])
- filename
-
A string naming the type library. A file can be one of the following types:
- A type library (TLB) or object library (OLB) file
- An executable (EXE) file
- A library (DLL) file containing a type library resource
- A compound document holding a type library
- Any other file format that can be understood by the LoadTypeLib API
If you omit the path from tlb-filename, AutoCAD looks for the file in the support file search path.
- mprefix
- pprefix
- cprefix
Note the required use of keywords when passing arguments to vlax-import-type-library.
Import a Microsoft Word type library, assigning the prefix “msw-” to methods and properties, and “mswc-” to constants:
_$ (vlax-import-type-library
:tlb-filename "c:/program files/microsoft office/msword8.olb"
:methods-prefix "msw-"
:properties-prefix "msw-"
:constants-prefix "mswc-")
T
Function wrappers created by vlax-import-type-library are available only in the context of the document vlax-import-type-library was issued from.
In the current release of Visual LISP, vlax-import-type-library is executed at runtime, rather than at compile time. In future releases of Visual LISP, this may change. The following practices are recommended when using vlax-import-type-library:
- If you want your code to run on different machines, avoid specifying an absolute path in the tlb-file-name parameter.
- If possible, avoid using vlax-import-type-library from inside any AutoLISP expression (that is, always call it from a top-level position).
- In your AutoLISP source file, code the vlax-import-type-library call before any code that uses method or property wrappers or constants defined in the type library.
-
The vlax-typeinfo-available-p function.