vlax-import-type-library??

nabil

Usenet Archive
Joined
Apr 19, 2001
Messages
8
Reaction score
0
Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 
try assigning different symbol name,
see if it does the same thing, ex:

methods-prefix "xlm-"
properties-prefix "xlp-"

:constants-prefix "xlc-"

Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 
It does not happen the 1st time I run the function, but if I attempt again it gives me that message. So I need to make a closure somehow to this library import. any ideas?
thanks.

try assigning different symbol name,
see if it does the same thing, ex:

methods-prefix "xlm-"
properties-prefix "xlp-"

:constants-prefix "xlc-"

Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 
You need to test if the type-lib is allready loaded.

example:
(if (null xl-open)
;;Check to see if type library defined
;;It is not, import the type library for EXCEL
(vlax-import-type-library
tlb-filename tlb
methods-prefix "xL-"
properties-prefix "xLp-"
constants-prefix "xLc-"
)
)
It does not happen the 1st time I run the function, but if I attempt again it gives me that message. So I need to make a closure somehow to this library import. any ideas?
thanks.

try assigning different symbol name,
see if it does the same thing, ex:

methods-prefix "xlm-"
properties-prefix "xlp-"

:constants-prefix "xlc-"

Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 
Thanks heaps, that was it.
Where can I get the info about the functions provided by the library like Excel9.olb in this case? I need to check if the file is opened and if it is get its vla-object without trying to open it again, Excel9 doesn't like it and ask questions about discarding info before re-opening? Thanks again, Nabil.

You need to test if the type-lib is allready loaded.

example:
(if (null xl-open)
;;Check to see if type library defined
;;It is not, import the type library for EXCEL
(vlax-import-type-library
tlb-filename tlb
methods-prefix "xL-"
properties-prefix "xLp-"
constants-prefix "xLc-"
)
)
It does not happen the 1st time I run the function, but if I attempt again it gives me that message. So I need to make a closure somehow to this library import. any ideas?
thanks.

try assigning different symbol name,
see if it does the same thing, ex:

methods-prefix "xlm-"
properties-prefix "xlp-"

:constants-prefix "xlc-"

Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 
You can get a list of commands from the apropos window in your Visual Lisp editor. Just click the apropos button and type in your prefix, excp- and hit OK.

You can get an explination of the commands through the Excel Visual Basic Editor. It's kinda a pain. If someone has a better way I would love to hear it!! Maybe someone should write a book.

Thanks heaps, that was it.
Where can I get the info about the functions provided by the library like Excel9.olb in this case? I need to check if the file is opened and if it is get its vla-object without trying to open it again, Excel9 doesn't like it and ask questions about discarding info before re-opening? Thanks again, Nabil.

You need to test if the type-lib is allready loaded.

example:
(if (null xl-open)
;;Check to see if type library defined
;;It is not, import the type library for EXCEL
(vlax-import-type-library
tlb-filename tlb
methods-prefix "xL-"
properties-prefix "xLp-"
constants-prefix "xLc-"
)
)
It does not happen the 1st time I run the function, but if I attempt again it gives me that message. So I need to make a closure somehow to this library import. any ideas?
thanks.

try assigning different symbol name,
see if it does the same thing, ex:

methods-prefix "xlm-"
properties-prefix "xlp-"

:constants-prefix "xlc-"

Hi All,

I am trying to use this function so I can send some data to Excel,

(vlax-import-type-library

:tlb-filename

"c:\\Program Files\\Microsoft Office\\Office\\excel9.olb"

:methods-prefix "excm-"

:properties-prefix "excp-"

:constants-prefix "excc-"

)

but I get this message

User warning: assignment to protected symbol: excm-Acos

and it asks me within a dialog box if I want to go into a loop which if I do I never get out of it.

Can anyone help me here?

Thanks heaps,

Nabil.

(sorry I sent this message by mistake to autodesk.autocad.2004)
 

Latest threads

Back
Top