Author Topic: AttachXref going into wrong space  (Read 3391 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
AttachXref going into wrong space
« on: January 26, 2015, 03:53:34 PM »
Ok, maybe it's something as easy as the cold medicine making me miss something, but I'm drawing a blank as to why this isn't working properly.

I have a routine that inserts a series of xrefs.  After a few rounds of seeing nothing show up in model space, I flipped back over to paperspace and zoomed out.  Yep.. there they were.  Inserted into PaperSpace.  They're inserting at the correct insertion point, scale, everything... but they're not going into model space.

So where am I going wrong here?

Set ActiveReference = ThisDrawing.ModelSpace.AttachExternalReference(Block.Path, Block.Name, InsPoint, 1, 1, 1, 0, False)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4072
Re: AttachXref going into wrong space
« Reply #1 on: January 28, 2015, 10:37:03 AM »
Hey Ben, long time no talk.  Is there anything else further down in the code that might be moving it?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)


  • Guest
Re: AttachXref going into wrong space
« Reply #2 on: February 04, 2015, 02:16:41 PM »
No.  Stepped through the SOB, and it just put them all into current space.

Just set ModelSpace as active before inserting the xrefs, and issue is gone.