.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Xref original file name of the drawing

1 REPLY 1
Reply
Message 1 of 2
DouceDeux
429 Views, 1 Reply

Xref original file name of the drawing

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 ???

 

1 REPLY 1
Message 2 of 2

Maybe this sample help you:

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

 

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost