vlax-import-type-library??

Discussion in 'AutoCAD' started by nabil, Jan 19, 2004.

  1. nabil

    nabil Guest

    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)
     
    nabil, Jan 19, 2004
    #1
  2. nabil

    mark Guest

    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)
     
    mark, Jan 19, 2004
    #2
  3. nabil

    nabil Guest

    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)
     
    nabil, Jan 19, 2004
    #3
  4. nabil

    Dan Guest

    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)
     
    Dan, Jan 19, 2004
    #4
  5. nabil

    nabil Guest

    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)
     
    nabil, Jan 19, 2004
    #5
  6. nabil

    Dan Guest

    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)
     
    Dan, Jan 19, 2004
    #6
  7. nabil

    nabil Guest

    Thank you ALL guys, thanks a bunch!
     
    nabil, Jan 20, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.