<Workspace Version="0.7.5.3566" X="-78.3464573487538" Y="-164.407324153512" zoom="0.908137371526314" Description="Finds all elements of a specified category that intersect with a list of vectors" Category="Clockwork.Revit.Selection.ByCollector" Name="All Intersecting Elements Of Category" ID="335463a8-f774-4d16-bb66-55ff7eaea076">
  <Elements>
    <Dynamo.Nodes.Symbol type="Dynamo.Nodes.Symbol" guid="ea2a65bc-dd9f-4940-b509-063c9df271f8" nickname="Input" x="495.865384877353" y="555.657471036433" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <Symbol value="3D View" />
    </Dynamo.Nodes.Symbol>
    <Dynamo.Nodes.Symbol type="Dynamo.Nodes.Symbol" guid="1f5d7880-bc85-4f4d-9808-db6b1d95e975" nickname="Input" x="491.902826375013" y="626.769795529414" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <Symbol value="Category" />
    </Dynamo.Nodes.Symbol>
    <Dynamo.Nodes.Symbol type="Dynamo.Nodes.Symbol" guid="bd0315e0-f0e8-4c49-9fa5-0da7783001e4" nickname="Input" x="292.16695000837" y="478.354770797013" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <Symbol value="Start Point(s)" />
    </Dynamo.Nodes.Symbol>
    <Dynamo.Nodes.Output type="Dynamo.Nodes.Output" guid="17cb003f-b0f2-4eac-a195-4add52786df8" nickname="Output" x="1288.19422137124" y="471.847899470161" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <Symbol value="Element(s)" />
    </Dynamo.Nodes.Output>
    <Dynamo.Nodes.Function type="Dynamo.Nodes.Function" guid="f20db999-bdcd-4092-b480-c4c53791a2ec" nickname="ReturnListOrSingleValue" x="1032.95605010228" y="475.64724059955" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <ID value="44ac4888-4aa4-49a9-9344-23b729c11df9" />
      <Name value="ReturnListOrSingleValue" />
      <Description value="If the item in input #1 is not a list, only the first item of the list in input #2 will be returned." />
      <Inputs>
        <Input value="item #1 (unknown)" />
        <Input value="item #2 (list)" />
      </Inputs>
      <Outputs>
        <Output value="" />
      </Outputs>
    </Dynamo.Nodes.Function>
    <DSIronPythonNode.PythonNode type="DSIronPythonNode.PythonNode" guid="88c83704-9882-4878-b8ac-2cdc9846af92" nickname="Python Script" x="678.146578446253" y="619.735653553499" isVisible="true" isUpstreamVisible="true" lacing="Disabled" inputcount="4">
      <Script>import System
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
theview = UnwrapElement(IN[0])
cat = System.Enum.ToObject(BuiltInCategory, IN[1].Id)
vstart = [x.ToXyz() for x in IN[2]]
vend = [x.ToXyz() for x in IN[3]]

intersectorlist = list()
counter = 0
filter = ElementCategoryFilter(cat)

while counter &lt; len(vstart):
	ThisReferenceArr = ReferenceIntersector(filter, FindReferenceTarget.All, theview)
	found = ThisReferenceArr.Find(vstart[counter], vend[counter])
	foundreferences = list()
	for item in found:
		foundreferences.append(doc.GetElement(item.GetReference()))
	intersectorlist.append(foundreferences)
	counter += 1
OUT = intersectorlist</Script>
    </DSIronPythonNode.PythonNode>
    <DSCore.Map type="DSCore.Map" guid="1b0a8327-b715-48a9-bd04-eb035eeacc1b" nickname="List.Map" x="852.614597167002" y="709.883859481739" isVisible="true" isUpstreamVisible="true" lacing="Disabled" />
    <Dynamo.Nodes.DSFunction type="Dynamo.Nodes.DSFunction" guid="3ea71792-53ad-4f6d-b72f-f30aac897388" nickname="List.UniqueItems" x="687.962962896238" y="793.887489367599" isVisible="true" isUpstreamVisible="true" lacing="Shortest" assembly="DSCoreNodes.dll" function="DSCore.List.UniqueItems@var[]..[]" />
    <Dynamo.Nodes.Function type="Dynamo.Nodes.Function" guid="f3295606-889a-4d3c-bf3f-ae7f72d39229" nickname="Turn Into List" x="488.972467894709" y="721.921836252808" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <ID value="cd09ad33-8c34-4850-ac26-24448d92c38f" />
      <Name value="Turn Into List" />
      <Description value="Turns an element (or a nested list) into a flat list" />
      <Inputs>
        <Input value="item" />
      </Inputs>
      <Outputs>
        <Output value="" />
      </Outputs>
    </Dynamo.Nodes.Function>
    <Dynamo.Nodes.Function type="Dynamo.Nodes.Function" guid="7100493e-8ecf-4ff7-8e16-eded027d2086" nickname="Turn Into List" x="482.182144490366" y="813.504447917174" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <ID value="cd09ad33-8c34-4850-ac26-24448d92c38f" />
      <Name value="Turn Into List" />
      <Description value="Turns an element (or a nested list) into a flat list" />
      <Inputs>
        <Input value="item" />
      </Inputs>
      <Outputs>
        <Output value="" />
      </Outputs>
    </Dynamo.Nodes.Function>
    <Dynamo.Nodes.Symbol type="Dynamo.Nodes.Symbol" guid="7457a5f4-517a-482d-bb9e-26429ea586d2" nickname="Input" x="308.324417223889" y="816.01355629099" isVisible="true" isUpstreamVisible="true" lacing="Disabled">
      <Symbol value="End Point(s)" />
    </Dynamo.Nodes.Symbol>
  </Elements>
  <Connectors>
    <Dynamo.Models.ConnectorModel start="ea2a65bc-dd9f-4940-b509-063c9df271f8" start_index="0" end="88c83704-9882-4878-b8ac-2cdc9846af92" end_index="0" portType="0" />
    <Dynamo.Models.ConnectorModel start="1f5d7880-bc85-4f4d-9808-db6b1d95e975" start_index="0" end="88c83704-9882-4878-b8ac-2cdc9846af92" end_index="1" portType="0" />
    <Dynamo.Models.ConnectorModel start="bd0315e0-f0e8-4c49-9fa5-0da7783001e4" start_index="0" end="f20db999-bdcd-4092-b480-c4c53791a2ec" end_index="0" portType="0" />
    <Dynamo.Models.ConnectorModel start="bd0315e0-f0e8-4c49-9fa5-0da7783001e4" start_index="0" end="f3295606-889a-4d3c-bf3f-ae7f72d39229" end_index="0" portType="0" />
    <Dynamo.Models.ConnectorModel start="f20db999-bdcd-4092-b480-c4c53791a2ec" start_index="0" end="17cb003f-b0f2-4eac-a195-4add52786df8" end_index="0" portType="0" />
    <Dynamo.Models.ConnectorModel start="88c83704-9882-4878-b8ac-2cdc9846af92" start_index="0" end="1b0a8327-b715-48a9-bd04-eb035eeacc1b" end_index="0" portType="0" />
    <Dynamo.Models.ConnectorModel start="1b0a8327-b715-48a9-bd04-eb035eeacc1b" start_index="0" end="f20db999-bdcd-4092-b480-c4c53791a2ec" end_index="1" portType="0" />
    <Dynamo.Models.ConnectorModel start="3ea71792-53ad-4f6d-b72f-f30aac897388" start_index="0" end="1b0a8327-b715-48a9-bd04-eb035eeacc1b" end_index="1" portType="0" />
    <Dynamo.Models.ConnectorModel start="f3295606-889a-4d3c-bf3f-ae7f72d39229" start_index="0" end="88c83704-9882-4878-b8ac-2cdc9846af92" end_index="2" portType="0" />
    <Dynamo.Models.ConnectorModel start="7100493e-8ecf-4ff7-8e16-eded027d2086" start_index="0" end="88c83704-9882-4878-b8ac-2cdc9846af92" end_index="3" portType="0" />
    <Dynamo.Models.ConnectorModel start="7457a5f4-517a-482d-bb9e-26429ea586d2" start_index="0" end="7100493e-8ecf-4ff7-8e16-eded027d2086" end_index="0" portType="0" />
  </Connectors>
  <Notes />
</Workspace>