Problems of List Sort and Drop Item

Tried to sort the sub lists created by elements intersections and drop the first items (as attached).
Not know how to solve the errors occurred as attached.
Thank you any help in advance!

What exactly are you trying to achieve? Have you checked what output you are getting from the Element.IntersectsElement node? There may be some null values in there, maybe take a screenshot with a watch node attached to the output so we can see what your output is showing

I am trying to make the clashed elements (which have intersections) to be rotated.
The first clash element not to be moved and only moved the others and looping until no further clash .
Here is the captured.

Thanks a lot for any help and advice!

You will need to remove the empty lists as that is what is the first item in the list, rather than your intersecting elements, the ‘Clear List’ node from Archilab can help with that.

Yes, thanks for your help. Even I don’t know why I can’t find package of archilab, I use clean list as instead. It seems the script works with no error at this stage.
I will add a loopwhile to run several times or prompt message if intersection still exists.
by the way, which node can be used to prompt a customized message box?
Thanks a lot for your help!

Search for archi-lab with a dash between “archi” and “lab”. (I had this same problem when searching for the package)

image

archi-lab.net is the one you’re looking for, mandrill and mantisshrimp are also useful so wouldn’t hurt to install those too.

As for a pop-up message box, you can do this with a python node. Use this code:

import clr
clr.AddReference(‘RevitAPIUI’)
from Autodesk.Revit.UI import TaskDialog

windowTitle = IN[0]
windowID = IN[1]

messageDialog = TaskDialog
OUT = messageDialog.Show(windowTitle, windowID)

Will try when back to office.
Thanks a lot for your great help!

Btw, i am thinking how to use while loop to loop each elements and transform its gemotry and check intesection with counter max 4 times each time a given degree angle.
or still clash give a warning message.
any guide for while loop?
Sorry to ask so much and you guys already help a lot!