Hi, I'm attempting to return a list of available CTB files, but I keep returning an error which I don't understand. Any clarification would be great. The code is: (defun getctb () (vlax-safearray->list (vlax-variant-value (vla-getplotstyletablenames (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object) ) ) ) ) ) ) and the error returned is: Backtrace: [0.57] (VL-BT) [1.53] (*ERROR* "ActiveX Server returned an error: Invalid index") [2.48] (_call-err-hook #<SUBR @01c393fc *ERROR*> "ActiveX Server returned an error: Invalid index") [3.42] (sys-error "ActiveX Server returned an error: Invalid index") :ERROR-BREAK.37 nil [4.34] (safearray-get-element #<safearray...> -1) [5.28] (#<SUBR @01c3c104 safearray->list> #<safearray...>) [6.24] (vlax-safearray->list #<safearray...>) [7.19] (GETCTB) [8.15] (#<SUBR @01c39244 -rts_top->) [9.12] (#<SUBR @01cd2334 veval-str-body> "(getctb)" T #<FILE internal>) :CALLBACK-ENTRY.6 (:CALLBACK-ENTRY) :ARQ-SUBR-CALLBACK.3 (nil 0) Thanks for any help Peter