Revit API

Reply
Valued Contributor
FRFR1426
Posts: 71
Registered: ‎04-05-2012
Message 1 of 2 (241 Views)
Accepted Solution

Find the RevitTypeLink from the RevitLinkInstance

241 Views, 1 Replies
12-18-2012 08:20 AM

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?

Valued Contributor
FRFR1426
Posts: 71
Registered: ‎04-05-2012
Message 2 of 2 (227 Views)

Re: Find the RevitTypeLink from the RevitLinkInstance

12-20-2012 03:04 AM in reply to: FRFR1426

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

 

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

 

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


Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit

Twitter

Facebook

Blogs

Youtube