Link Name and Link Instance Name

Hello Community,

is it possible to get the Link Name and Type of an element in a link.

Having read this thread:

I think it might be but I am not comfortable with the Revit API.

Any help will be really appreciated.

Hi @BIMadmin,

You could use the Element to Document node :
Element to Document

I’m not sure I understand about the type ? Don’t you want the category of the element rather ?

Hello Alban,

I mean Link Name or Instance for that rvt link.

Is this possible?

Any ideas!!!

You have the document from the first output of the Element to Document node, from there you just need the title of the document.

See if any of the common packages have a Document Title node or try Element.Name on the document. I don’t have Revit open right now so I can’t test but it should be pretty straightforward.

Hello Kenny,
Thanks for that
I believe the title of the document is the Link Name but we need the Link Child Name, the id of the link instance.

It might be easier then to just get all of the linked rvt’s in the project and compare link names between what you get from the Element to Document node and the rvt’s in the project.

Compare? How?

Is that what you are looking for?


Link Name and Link Instance Name.dyn (20.5 KB)

Hello Albán,
No not exactly, similarly to the thread I mentioned at the beginning of the post I want to read that from element in the link, in your example above the wall elements.
What you are doing is list management to get elements grouped.
I want to know if it is possible to read that similarly to the Revit link name the instance also.

See if BimorphNodes LinkElements do what you need. If you use these nodes to collect the elements then they do, so it all depends on how you are obtaining the linked elements and whether you can use LinkElement.OfCategory for example.

LinkInstanceId can be used to get you know what, and Element.Name can be used to get the name of the instance.

Hi Thomas, I think I tried this, the input there is the link or it can be the element within?
Btw I am using your node of category.

Is this doable?
Can we query an element to what Revit Link Instance its belong to?

I’m not sure if this is possible (directly from the element) as the element is technically the same in all instances. How are you getting the linked element in the first place?

Hello Nick,
I am using the Python Node shared by Kennyb6.
Capture
However not sure how to access the link instance.

That’s getting you the linked element’s document, but how are you getting the element? Are you using a node to pick specific elements, are you getting all elements of a certain category from a link, etc?

You might be able to select the link first and then the element depending on how you’re getting your linked elements.

I am using collect.linkedstanceElements from the Spring package.


Dyn attached in case you can have a look.Export to Excel Door Handed from Elements in Links.dyn (109.3 KB)

Hi Francisco,

This is only possible with the LinkElement class as Thomas wrote and not with the (linked) element class :


Link Name and Link Instance Name.dyn (16.9 KB)

1 Like

That is awesome!

Sorry Thomas I did not understand what you meant.

Thank you very much for having a look into it Alban.

I will update the graph and share it in case anyone fancy it.

In that case you already have your linked instances. You just need to get the name.