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: 

Find the RevitTypeLink from the RevitLinkInstance

1 REPLY 1
SOLVED
Reply
Message 1 of 2
FRFR1426
512 Views, 1 Reply

Find the RevitTypeLink from the RevitLinkInstance

I know I can test if the document title is contained in the name of the LinkInstance like this:

 

linkInstance.Name.Contains(linkedDocument.Title)

 but is there a more direct and safe way?

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
1 REPLY 1
Message 2 of 2
FRFR1426
in reply to: FRFR1426

Ok, I've found it. Simply use GetTypeId:

 

var linkType = (RevitLinkType)document.GetElement(linkInstance.GetTypeId());

 

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

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