Coding Hints for Using vlax-import-type-library

AutoCAD AutoLISP & Visual LISP

 
Coding Hints for Using vlax-import-type-library
 
 
 

In AutoCAD, vlax-import-type-library is executed at runtime rather than at compiletime. 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-filename parameter.
  • If possible, avoid using vlax-import-type-library from inside any AutoLISP expression (in other words, 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.