Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get ImportInstance dwg name

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Dale.Bartlett
866 Views, 3 Replies

Get ImportInstance dwg name

I am missing something obvious. I want to return the name of an Imported (not linked) DWG. The following is just not doing it for me...

foreach (ImportInstance ii in new FilteredElementCollector(pDoc)

.OfClass(typeof(ImportInstance))

.Cast<ImportInstance>()

.Where(i => i.IsLinked == false))

{

ElementId Id = ii.Id;

string name = ii.Name;

string tname = ii.GetType().Name;




______________
Yes, I'm Satoshi.
3 REPLIES 3
Message 2 of 4

Have you tried the 

ii.Category.Name property?

 

That returns the name in my application...

 

 

Message 3 of 4

The day is made when you learn one new thing...

Many thanks, Dale




______________
Yes, I'm Satoshi.
Message 4 of 4
rodrigohbm
in reply to: Dale.Bartlett

Hello
There is way to get the path file

 

example:

 

c:\structural\sheet\102-floor 1 plant.dwg

 

and change path

 

c:\mep\structural\sheet\102-floor 1 plant.dwg

 

regards

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


Rail Community