Author Topic: ObjectDBX Xref for block  (Read 9011 times)

0 Members and 1 Guest are viewing this topic.

T.Willey

  • Needs a day job
  • Posts: 5218
Re: ObjectDBX Xref for block
« Reply #90 on: December 19, 2007, 06:07:30 PM »
How would you use getfiled then to attach the drawing?
You don't use it to attach the file (xref), but to get the location of the file.  Once you have that, then you know what you are going to attach, and you can use the 'AttachExternalReference' method on the space (tab) you want to add the xref.  This might be a little more advance stuff than what you are using right now, but it isn't that hard.  I would go that ActiveX route.

And is there a way for the dia to remember the last folder that I was in?
Depends on what you want it to remember, and how you want it to remember.  If you want it to remember within the same drawing, then you just make the directory a global variable.  If you want it to be know in all drawings that are opened, or going to be opened, then you make it a global variable, and use the 'vl-propagate' function to send it to all drawings.  These are both ways to keep it known in the current Acad session.  If you want it to be known past that, then you have to write it to a file or the registry.
Tim

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

Please think about donating if this post helped you.

OcCad

  • Guest
Re: ObjectDBX Xref for block
« Reply #91 on: December 19, 2007, 06:10:25 PM »
Okay, and one more question.

What about the option to make the xref relative?

Make it two... How long have you being writing code? (gives me something to look foward to)

T.Willey

  • Needs a day job
  • Posts: 5218
Re: ObjectDBX Xref for block
« Reply #92 on: December 19, 2007, 06:13:43 PM »
Okay, and one more question.

What about the option to make the xref relative?
From what I have seen about that, it is how the path is stored within the drawing.  So it depends on how far you want the relative path to go.  If you want it one folder back, I think you would just put the path like

..\Xrefs\Xref.dwg

But you may need to test to make sure.
Tim

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

Please think about donating if this post helped you.