Announcement

Collapse
No announcement yet.

Picking multiple elements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Picking multiple elements

    Hi,

    I'm looking for a node that will allow me to pick multiple elements. I know that the OOTB node "Select Model Elements" will allow a box-style selection, but that's not want I'm looking for.

    I did notice this node in the Rhythm package:

    https://dynamonodes.com/2017/11/02/pick-model-elements/

    but for some reason that node isn't available for me. I have the latest version of the Rhythm package installed but that node isn't available.

    I'm running Dynamo version 2.3.0.6370. When I installed the Rhythm package there was a warning that the package was made for a later version of Dynamo. But as far as I know, I'm running the latest version. I'm using Revit 2020 and when I go to "Version" it tells me that Dynamo is "up to date."

    So, if I can't get Rhythm to work, does anyone know of another package that will give me this "pick multiple" functionality?

    Thanks!

    #2
    Hi there!

    This node was removed some time ago with the transition to Dynamo 2.0. More information about that here: https://github.com/johnpierson/Rhyth...movals-of-dyfs


    I plan to add a similar node back to the package with a C# replacement, but have not had a chance to get it done.

    For now, you can use the following python script:
    HTML Code:
    import clr
    
    clr.AddReference("RevitNodes")
    import Revit
    clr.ImportExtensions(Revit.Elements)
    
    clr.AddReference("RevitAPIUI")
    from  Autodesk.Revit.UI import *
    
    clr.AddReference("RevitServices")
    import RevitServices
    from RevitServices.Persistence import DocumentManager
    
    doc = DocumentManager.Instance.CurrentDBDocument
    uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
    
    #offer the user the selection
    elementReferences = uidoc.Selection.PickObjects(Selection.ObjectType.Element, 'Pick model elements')
    
    #our list to append selection results to
    elements = []
    
    #obtain the elements via the id
    for i in elementReferences:    
        try:
            elements.append(doc.GetElement(i.ElementId))
        except:
            elements.append([])
            
    OUT = elements
    Last edited by johnp; January 4, 2021, 06:39 PM.

    John Pierson
    Creator of Rhythm, Monocle, Bang! and Lots of Other Okay Stuff.
    Twitter - @60secondrevit | Email - [email protected] | Blog - sixtysecondrevit.com | Work - parallaxteam.com

    Comment


      #3
      This was removed a while back with the 2.0 transition and I have not added a C# replacement yet.

      More info on that here: https://github.com/johnpierson/Rhyth...movals-of-dyfs


      In the meantime here is the python to get you going: (copy/paste into a python node)
      https://gist.github.com/johnpierson/...842e7890c73f0f

      John Pierson
      Creator of Rhythm, Monocle, Bang! and Lots of Other Okay Stuff.
      Twitter - @60secondrevit | Email - [email protected] | Blog - sixtysecondrevit.com | Work - parallaxteam.com

      Comment


        #4
        Thanks John!

        Comment

        Related Topics

        Collapse

        • GetSurroundingElements Node Not Working
          Anyone have any ideas on why the get surrounding elements node would be failing me here in the attached script image? I know it use to work and it works...
          October 25, 2016, 08:23 PM
        • Spring Package Interference Check node does not work
          hey all ,
          the node in the spring package does not work in revit 2020


          does anyone has any idea why it is not working?
          and...
          June 13, 2019, 06:58 AM
        • Rhythm UI.UserMessage node
          I've got some versioning issues.
          I'm still using Dynamo 1.3.2 (need 2016 support)
          I had been on Revit 2018.2 & recently upgraded to...
          June 15, 2018, 03:23 PM
        • Clockwork Nodes Are amamzing.....but
          all of the sudden I do not know what is going on....

          My clockwork nodes are returning NULL...

          element.location is the first...
          January 18, 2017, 05:08 AM
        • Equivalent node
          Hey guys,
          I am having an issue, I am following a course and it requires the Documents.Builtincategories from clockwork. I can,t find the node AT...
          October 22, 2020, 01:19 PM
        Working...
        X