PDA

View Full Version : WARNING: Land/Civil Type Library filename changed in 2006


sinc
2006-02-09, 11:41 PM
For those of you that write Lisp for Land Desktop/Civil Design and register the type library in your code, you may want to be aware of a change. The type library filename used to be "landauto.tlb". In 2006, the filename was inexplicably changed to "landauto46.tlb". :screwy:

(At least, I'm assuming it changed in 2006 - I haven't used 2005. But I could find no warning about this change in the release notes for 2006.)

So if you write any code for LDD/Civil and you register the type library, and you want to make sure it still works in 2006, you can use the following code snippit:

(setq avn (substr (getvar "ACADVER") 1 4)
tlb (cond
((= avn "16.2") "landauto46.tlb") ; LDD 2006
((= avn "17.0") "landauto50.tlb") ; LDD 2007
; add any future entries here
("landauto.tlb")
)
) ;_setq
(if (null vll-kCurve)
; Define all LDD methods, properties, and constants as starting with "vll"
; It's possible I should use a different prefix for each, but as of yet I
; haven't found a good reason to, and I prefer having all LDD references
; start with "vll"
(vlax-import-type-library
:tlb-filename tlb
:methods-prefix "vll-"
:properties-prefix "vll-"
:constants-prefix "vll-"
) ;_ vlax-import-type-library
) ;_ if
(setq
avn nil
tlb nil
) ;_setq

sinc
2006-05-03, 05:05 PM
Sure enough, Autodesk changed the filename again.

I have updated the code in the original post to include LDD 2007.