.NET

Reply
Active Contributor
DouceDeux
Posts: 46
Registered: ‎09-04-2012
Message 1 of 2 (104 Views)

Xref original file name of the drawing

104 Views, 1 Replies
01-30-2013 02:22 PM

Hello!

 

I'm trying to get just the filename either with or without the .dwg extension for an xref given I already have its reference (BlockReference) and its model space (BlockTableRecord) all open for read; skipping accessing any BlockTable.

 

Im doing something like this:

 

  • Either get the XGraph and first node or prompt user for a block reference and check it's from attachment
  • Start active document's database transaction, get the BlockReference.
  • Get the BlockTableRecord only with the BlockReference's BlockTableRecord-ObjectId property.
  • At this point I can iterate through the model space and see the nuts and bolts of the xref drawing without actually changing anything after saving my drawing, even after committing a trasaction.

So what I want to know is how to get the filename of the xref'ed drawing (i.e. Original_Drawing.dwg).

I'm looking at doing this without opening the referenced drawing as a side database and checking the filename.

I can't debug right now, but is it. myBlockTableRecord.Database.OriginalFileName ???

 

Moderator
Alexander.Rivilis
Posts: 1,398
Registered: ‎04-09-2008
Message 2 of 2 (98 Views)

Re: Xref original file name of the drawing

01-30-2013 03:08 PM in reply to: DouceDeux

Maybe this sample help you:

Finding all XREFs in the current database using C#.NET

 

 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community