ObjectDBX Audit

Discussion in 'AutoCAD' started by dean_bourke, Feb 26, 2005.

  1. dean_bourke

    dean_bourke Guest

    This code seems to be auditing the current drawing and not the dbxdoc. I think the commented line is the problem line.
    Any help appreciated.
    Dean

    (defun C:xx (/ dbxdoc objname)
    (if (= (atoi (getvar "AcadVer")) 16)
    (setq dbxdoc (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument.16"))
    (setq dbxdoc (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument"))
    )
    (setq done nil)
    (setq files (dos_find "h:\\*.dwg" 1))
    (foreach file files
    (vla-open dbxdoc file)
    (print file)
    (vla-AuditInfo(vla-get-ActiveDocument(vlax-get-acad-object)):vlax-false)

    ;;;(vla-AuditInfo (vla-put-ActiveDocument dbxdoc) :vlax-false)


    (setq done (append done (list file)))
    )
    (vlax-release-object dbxdoc)
    (print done)
    (princ)
    )
     
    dean_bourke, Feb 26, 2005
    #1
  2. dean_bourke

    Jeff Mishler Guest

    Dean, you are correct....if ObjectDBX supported AuditInfo you would try
    changing this:
    (vla-AuditInfo(vla-get-ActiveDocument(vlax-get-acad-object)):vlax-false)
    to this:
    (vla-AuditInfo dbxdoc :vlax-false)
    However, ODBX does NOT support that method so you will need to open each
    drawing in the editor to run an audit....sorry.
     
    Jeff Mishler, Feb 26, 2005
    #2
  3. dean_bourke

    dean_bourke Guest

    Thanks Jeff,
    Do you know if it possible in VBA?

    Dean.
     
    dean_bourke, Feb 26, 2005
    #3
  4. Dean - First, You are confusing two objects:

    AcadDocument
    AxDbDocument

    The former has the AuditInfo method, the latter does not.

    The reason your code is auditing the active document,
    is because you're telling it to, by passing the value of
    the ActiveDocument property to the AuditInfo method.

    Your commented out line of code is attempting to make
    a database opened via ObjectDBX the active document,
    which cannot be done.

    I don't believe there is any way to audit a database that's
    not open in the AutoCAD editor.
     
    Tony Tanzillo, Feb 26, 2005
    #4
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.