Author Topic: FYI - You cannot attach an xref with ObjectDBX ( bug? )  (Read 1670 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5251
FYI - You cannot attach an xref with ObjectDBX ( bug? )
« on: October 02, 2008, 06:59:21 PM »
If you run this command, you will notice that the xref actually attaches to the current drawing's model space instead of the ObjectDBX's model space.  With this new finding I guess the code I have been working on to switch xref styles doesn't really mean much, since I was hoping it could be used in a batch type program with ODBX.  Maybe it will have to be done in C# then.

Or is this a bug that should be reported?

Code: [Select]
(defun c:OdbXrefTest (/ DwgFile dbxApp oVer dbxMspace)
   
    (and
        (setq DwgFile (getfiled "Select drawing to xref in." "" "dwg" 4))
        (setq dbxApp
            (if (< (atoi (setq oVer (substr (getvar "acadver") 1 2))) 16)
                (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument")
                (vla-GetInterfaceObject (vlax-get-acad-object) (strcat "ObjectDBX.AxDbDocument." oVer))
            )
        )
        (setq dbxMspace (vla-get-ModelSpace dbxApp))
        (vlax-invoke
            dbxMspace
            'AttachExternalReference
            DwgFile
            "Testing"
            '(0. 0. 0.)
            1.
            1.
            1.
            0.
            1
        )
        (vlax-release-object dbxApp)
        (setq dbxApp nil)
    )
    (princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: FYI - You cannot attach an xref with ObjectDBX ( bug? )
« Reply #1 on: October 02, 2008, 08:10:58 PM »
What version of Acad, Tim? I know this was a bug/feature at one time but I thought it was fixed in 2007+.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: FYI - You cannot attach an xref with ObjectDBX ( bug? )
« Reply #2 on: October 02, 2008, 09:02:06 PM »
What version of Acad, Tim? I know this was a bug/feature at one time but I thought it was fixed in 2007+.
Still on '06 for work.  I have '08 at work.  I will test it tomorrow to see if the same thing happens.  Thanks for the heads up Jeff.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: FYI - You cannot attach an xref with ObjectDBX ( bug? )
« Reply #3 on: October 03, 2008, 01:17:26 PM »
What version of Acad, Tim? I know this was a bug/feature at one time but I thought it was fixed in 2007+.
Seems like you were correct Jeff, as I can attach an xref in a drawing opened with ODBX in '08.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.