XREF verification

Discussion in 'AutoCAD' started by blairmack, Oct 27, 2004.

  1. blairmack

    blairmack Guest

    Is there a way to verify if there are any xrefs within a file without opening that file? I know you can use the Designcenter but would like to use code as part of a routine to check if all files have been bound into an exported file.
     
    blairmack, Oct 27, 2004
    #1
  2. blairmack

    Rudy Tovar Guest

    Here's the bait, now you'll have to land it...

    (vl-load-com)
    (defun c:dbxblock (/ dbxDoc dwgname la cn lp it con)
    (setq dwgname (getfiled "Select Drawing File" "" "dwg" 4))
    (if dwgname
    (progn
    (setq dbxDoc
    (vla-GetInterfaceObject
    (vlax-get-acad-object)
    "ObjectDBX.AxDbDocument"
    )
    )

    (vla-open dbxDoc DwgName)

    (setq la (vla-get-block dbxdoc)
    cn (vla-get-count la)
    lp 0
    )

    (repeat cn
    (setq it (vla-item la lp)
    )
    (setq con (vla-get-isxref it))
    (princ con)

    (setq lp (1+ lp))

    )

    (vl-catch-all-apply
    '(lambda () (vla-close DBXDOC ':VLAX-TRUE 'ITEM))
    )

    (VL-CATCH-ALL-APPLY
    'vlax-release-object

    (list dbxDoc dwgname la cn lp it con)

    )
    (vlax-release-object dbxDoc)

    (setq dbxDoc nil)
    )
    )
    (princ)
    )

    --
    MASi
    Copyright 2004 by Cadentity
    www.Cadentity.com
    Autodesk
    Authorized Developer
     
    Rudy Tovar, Oct 28, 2004
    #2
  3. blairmack

    David Allen Guest

    Reference Manager
    Installs with 2005

    blairmack <>
    |>Is there a way to verify if there are any xrefs within a file without opening that file? I know you can use the Designcenter but would like to use code as part of a routine to check if all files have been bound into an exported file.


    David
     
    David Allen, Oct 29, 2004
    #3
  4. blairmack

    Rudy Tovar Guest

    "...would like to use code as part of a routine ..."

    Just curious...How do you code that...?
     
    Rudy Tovar, Oct 29, 2004
    #4
  5. blairmack

    David Allen Guest

    your the dbx master, you already know how to do that :p

    "Rudy Tovar" <>
    |>"...would like to use code as part of a routine ..."
    |>
    |>Just curious...How do you code that...?
    |>
    |>|>> Reference Manager
    |>> Installs with 2005
    |>>
    |>> blairmack <>
    |>> |>Is there a way to verify if there are any xrefs within a file without
    |>> opening that file? I know you can use the Designcenter but would like to
    |>> use code as part of a routine to check if all files have been bound into
    |>> an exported file.
    |>>
    |>>
    |>> David
    |>


    David
     
    David Allen, Nov 1, 2004
    #5
  6. blairmack

    blairmack Guest

    Thanks for that Rudy.
    Seems to bomb out at:
    (setq dbxDoc (vla-GetInterfaceObject
    (vlax-get-acad-object)
    "ObjectDBX.AxDbDocument"
    )
    )
    Message as follows : note:> nilAutomation Error. Problem in loading application.
    I'm only just starting to feel my way in Visual after using Autolisp forever.

    Any help would be much appreciated.

    Blair.
     
    blairmack, Nov 2, 2004
    #6
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.