Emulate mouse click / mouse drag in Dynamo in order to get elements at certain coordinates in active view

Hi guys, kept searching the internet for this but couldn’t find much Dyn-ready info.

(i found that in pyth you can emulate mouse drag - but don’t know how to push that into Dynamo)

The idea is that i work with nested families and this is not going to change and it is not up to me etc.
The “first” family contains the 3d of the object and the “second” nested family has the 2d symbol.

The only way Dynamo sees the “object” - is by seeing the 3d symbol. (“first” family) of the device,
it does not see the 2d symbol geometry (“second”, nested family) AT ALL.
Not even if i check the “Shared” box in the nested family - still does not see the geometry and cannot select it)

I know this cause I tried using some nodes to get elements at location / intersect area and if the 2d symbol is moved away from the 3d then it will not get it.

What i would want to do is have Dyn be able to “click” select at a specified point / “drag box” by providing 2 points.

I can see there is this:
PickBox(PickBoxStyle) Invokes a general purpose two-click editor that lets the user to specify a rectangular area on the screen.

Problem is i really have no idea as to how to use it (still looking at tutorials for using Revit API) let alone give it 2 points instead of using the mouse as i assume that is the intended manner of use.

I find it strange i could not find this request so far.

This will be used to generate wires from detail lines , more specifically to get the device to connect the wire to by having revit select the device really close the the end points of the wire.

Hi @bogdan.petrescu63URX,

Just to clarify what you are trying to do:-

  • Select nested family/families within selection rectangle provided by user (user selection by rectangle)

Or

  • Get nested family/families from a bounding box based on values in script (script has min/max points in which to search for families with nested families)

I think from what you are saying you are after a user selection method by rectangle right?

Cheers,
Dan

hi there, the first one is my aim:

i want to select the “outer” family using the “nested” one by telling it the points that make the rectangle diagonal.

so again - this is important:
i want to provide the points which make the rectangle, i do not want to have Dynamo wait for user input - manual selection with rectangle drag.

Hi @bogdan.petrescu63URX ,

What happens when you create a view in Revit which only shows the nested family categories?
Also, some screenshots would help tremendously.

Hi @Daan !

well the views we use do not show the 3d , just the 2d (the nested family).
so i already have that kind of view i guess?
(detail level is set to coarse)

i will add screenshots with the view showing just the nested family and with the nested families from the demo project in a short while.

here is the view - showing just teh nested families (2d symbols of devices):

and here is the nested family - 2d symbol family inside the detector’s family: