Rhino inside + Human UI - Select graphic element in REVIT

First of all thanks @andheum for the plugin
Is it possible to create a window with human UI to select a revit geometry?

Just like the “select graphic element” below

I search here and found a C# script for select in rhino viewport, but it is not working in revit obviously

I don’t know enough about Rhino Inside Revit to build this — not sure how that set function works. It would need to follow the pattern of the “pick from rhino” button — if someone who understands RiR better than me wants to write the pick function akin to this one: https://github.com/andrewheumann/humanui/blob/88219c348c93d516ad1715ad8df62ebf6aa7a7d6/HumanUI/HumanUI/Custom%20Types/HUI_RhPickButton.cs I’d be happy to incorporate it.

In order to create the component that Andrew is referring to, you would need to use the Revit API using the pattern of RhPickButton, as Andrew describes – and of course if this is included in HUI, it should only be available in the menus when Revit is the active host. I haven’t built any components for Rhino.Inside yet so I don’t know the specific mechanism, but I assume that it’s part of the SDK based on our usage of Rhino.Inside and existing the Grasshopper plug-ins out there, which only show their functions when they are connected to the available host.

I could see a world where there are a number of supported hosts in HUI, each with the appropriate referenced packages for dev purposes, and they might be separate projects/dll in the repo to allow for better source control independence. The refactor necessary to do this might not be worth the effort, though. Depends how many application-specific components are anticipated in the long run. Intriguing idea either way.


1 Like

Hmmm I understand.
What I did to solve it was to make an automatic bake for the detail lines (in revit) so they became curves in rhino viewport then I pick it with toggle button.
Thank you guys

Rhino.Inside.Revit provides a set of extension methods on UIDocument that wraps the Revit API selection functionality (due to context changes that are required between Rhino and Revit windows)

See this: https://github.com/mcneel/rhino.inside-revit/blob/master/src/RhinoInside.Revit/External/UI/Selection.cs


I would like to prepare HumanUI Rhino.InsidePickButton to have possibility to select Revit elements and also selection filters from HumanUI interface. I have duplicated HUI_RhPickButton and called it HUI_RhInsidePickButton and tried to change the code but despite Rhino.Inside nuget installation the namespace RhinoInside.Revit.External.UI.Selection to use PickObject method is not available.

I would like to prepare left click Human UI button menu the same like at Rhino.Inside to get opportunity to Select One Object, Multiple Object and also selectionFilters.

Unfortunately I have only basic knowledge of C# with Rhino.Inside API so any help and suggestion are welcome.

I’ve tried to find on Rhino.Inside Github Repository code responsible for Graphical Element to better understand the construction left click button and access menu. Unfortunately I couldn’t find it.

I really appreciate to sending the link to that part of repository.

I’m sending link to Github repository where I’m working on this HumanUI button. I will be grateful for every help.


I see that Github link you provided is marked as obsolete.
Also, link from this post is not working

Is there something new in that topic? Has anyone sucessfuly made Human UI to click-select graphical elements in Revit?

I think there might be an answer on that topic here https://discourse.mcneel.com/t/rhino-inside-revit-crashing-with-human-ui-if-window-has-not-been-opened/147690/12