Set Lisp Variable

Discussion in 'AutoCAD' started by Jon, Sep 19, 2004.

  1. Jon

    Jon Guest

    After trawling the past news database I was able to pass a string array to a
    Lisp variable using code outlined by Tony Tanzillo, which works fine in R3
    However, in R5 and C3D I get the error "ActiveX component cannot create
    object.
    I have ensured that vl-load-com has been run, but the error remains.
    Does anyone have any clues?
    I am in the process of transcribing my old lisp to vba, but I can't do them
    all at once, so this will allow me to access the C3D points database and
    pass it to the lisp routine.

    Public Sub SetLispVar()
    Dim vlApp As Object
    Dim vlFuncs As Object
    Dim vlSet As Object
    Dim vsym
    Set vlApp = CreateObject("Vl.Application.1") 'error line
    Set vlFuncs = vlApp.ActiveDocument.Functions
    Set vsym = vlFuncs.Item("read").funcall("listofc3dpts")
    Set vlSet = vlFuncs.Item("set")
    If IsArray(Value) Then
    Dim List As Variant
    List = Value
    vlSet.funcall vsym, List
    Else
    vlSet.funcall vsym, Value
    End If
    End Sub

    Ta,

    Jon
     
    Jon, Sep 19, 2004
    #1
  2. change "VL.Application.1" to "VL.Application.16"

    - alfred -
     
    Alfred NESWADBA, Sep 19, 2004
    #2
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.