Message 1 of 3
Listing CTB Files ?

Not applicable
09-20-2004
03:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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 # "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 # -1)
[5.28] (#list> #)
[6.24] (vlax-safearray->list #)
[7.19] (GETCTB)
[8.15] (#)
[9.12] (# "(getctb)" T #)
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)
Thanks for any help
Peter
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 #
error: Invalid index")
[3.42] (sys-error "ActiveX Server returned an error: Invalid index")
:ERROR-BREAK.37 nil
[4.34] (safearray-get-element #
[5.28] (#
[6.24] (vlax-safearray->list #
[7.19] (GETCTB)
[8.15] (#
[9.12] (#
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)
Thanks for any help
Peter