Hello.
I found a component for querying Revit links.
Revit allows to create parts from Revit links. To select an element from a link you press tab+ click on the element. Is it possible to automate this with rhino inside?
I just found a video in rhino.inside webpage. I think it explains.
I am able to select the elements from linked files and create geometry in rhino file, but is there a way to create parts form these in Revit document?
Its possible via scripting, i’ll take a look at it this weekend if there isn’t any progress.
You can check the below haven’t tested much but it does the job, you can query the elements you want from the link document and you can then create parts from the link instances you want respectively
can be further modified if needed through the code to make it more robust…

RiR_CreatePartsFromLinkElements.gh (13.4 KB)
Also while working on the above, I am wondering if there is a component or a way to get which link instance an element is coming from when using graphical element to manually select using any revit/rhino versions?
The ID of the link instance is showing in the panel but don’t think I found a way to get that information using Revit components other than splitting/matching text… am I missing something?
I see what you mean, casting to the document doesn’t provide the instance ElementID, you have to get the LinkInstance
Thanks for the quick CreatePartsScript, my first attempt had an odd casting error from the LinkElementId constructor
First of all thank for your help.
I am getting an error
- One or more element ids was not permitted for creating parts. HostOrLinkElements should be of a valid category and the ids should be valid and should not already be divided into parts.
Parameter name: hostOrLinkElementIds
The Walls Are attached to roofs and my project has many phaces.
If i remove the Walls categories seems to work.
Would you be able to isolate a couple of walls that cause this error or replicate the issue in a separate model and share it to have a look if possible?
EDIT1:
I have checked and I got this error when I intentionally provided wrong input (Elements from one link document with a wrong Link instance), so maybe you can confirm your input is matched correctly.
I have also checked with attached walls and it created the parts with no errors.
EDIT2:
Updated script with the below check and cleaned it up a little, try it out and let us know
RiR_CreatePartsFromLinkElements-V2.gh (10.7 KB)


