List of CanonicalMediaNames Error.

Discussion in 'AutoCAD' started by BillZ, Jan 21, 2004.

  1. BillZ

    BillZ Guest

    With this snip of code I get a variant:

    Command: (vlax-variant-value (vla-getCanonicalMediaNames (vla-get-activelayout
    (vla-get-activedocument (vlax-get-acad-object)))))
    #<safearray...>

    But when i try to list these I get:

    Command: (vlax-safearray->list (vlax-variant-value (vla-getCanonicalMediaNames
    (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))))
    ; error: ActiveX Server returned an error: Invalid index

    What does this error mean?

    Bill
     
    BillZ, Jan 21, 2004
    #1
  2. BillZ

    BillZ Guest

    Nevermind:

    Needed: (vla-RefreshPlotDeviceInfo

    Bill
     
    BillZ, Jan 21, 2004
    #2
  3. An empty Safearray??
    --
    Ken Alexander
    Acad2004
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Jan 21, 2004
    #3
  4. BTW you need to use.

    (vla-RefreshPlotDeviceInfo
    (vla-get-activelayout
    (vla-get-activedocument
    (vlax-get-acad-object))))

    --
    Ken Alexander
    Acad2004
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Jan 21, 2004
    #4
  5. BillZ

    BillZ Guest

    Yup,
    Thanks.
    It's just a mtter of beating your head on this stuff until you learn it. \8^?

    Bill
     
    BillZ, Jan 21, 2004
    #5
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.