Delete duplicated objects

Im currently using Revit 2017 and working with dynamo player so all scripts i have are using arch lab 2016 which would change everthing if i change it to the new arch lab version.

In that case I think your best bet would be to have a look at @Konrad_K_Sobon’s github and see if it is possible for you to re-create the node in a single instance so that you do not have to update the entire package.

I can see on the aforementioned github that the “GetWarnings” node was added 6 months ago.

Apologies - I forgot GetWarnings is only for 2018 API and above. Instead, you should be able to export the Warnings report from Revit and use the archi-lab node Warning.ParseHtml

1 Like

I made a small python script that can accomplish the same (with great help from @Konrad_K_Sobon’s github page:

import clr
clr.AddReference('RevitAPI')
import Autodesk
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
warnings = doc.GetWarnings()
failuremsg = []
elems = []
for item in warnings:
    failuremsg.append(Autodesk.Revit.DB.FailureMessage.GetDescriptionText(item))
for item in warnings:
     elems.append(Autodesk.Revit.DB.FailureMessage.GetFailingElements(item))
OUT = warnings, failuremsg, elems
2 Likes

@Jonathan.Olesen the GetWarnings() method unfortunately won’t work for Revit 2017. The older way is to parse the warning HTML export file created by Revit. GetFailingElements() and GetDescriptionText() are accessible before the 2018 API though

3 Likes

Hi Amy, thanks for the clarification I did not know that :slight_smile:

1 Like

@Jonathan.Olesen no problem! Its hard to tell just glancing at the API docs; I think I remembered reading it on a post on here about the API changes

@cberrocal I just checked on a 2016 file to be certain I didn’t give poor advice here; the archi-lab warning nodes would work with Revit 2017 if you replaced Warning.GetWarnings with Warning.ParseHtml. However if these are unavailable to you, here is an alternate option from Springs:

5 Likes

Hi @cberrocal

Here is another method using OOTB nodes Performance Adviser Rules. Run’s Revit’s performance adviser directly in dynamo and explore failure messages. This was added in Dynamo 1.3.

13 Likes

Thank you @Kulkul it work!

@cberrocal Please mark the post as solved :wink: . You’re welcome!

Hi guys, somehow the script delete most of my elements weatter they were duplicate or not. So i am trying to do something like this but it seems not to work. I am using dynamo 1.3 and Revit 2017

Hi,

Sorry for digging up graves here
 the performance advisor works well for standalone families like air terminals, equipment, fittings etc.

How do you handle ducts, flex ducts and pipes where revit is not showing an error but you do have multiple instances in the same place.

I have created the following but it doesnt seem to remove the duplicates also don’nt think its picking up all the duplicate instances.

Hi,
Did anyone get a way around to this problem. It seems I am also facing the same issue in my project.

Hello,
is it possible for you to redo the image file so that I can read the name of the nodes.
I am writing a script, and I am having the same problem as this one.
thank you

I know this is an old post.
Will this work for annotations
door, wall, window tags, dimensions, etc?

Thanks for your help,
Mike

Let check post in here : Check Element Duplicate Dynamo Revit | Hồ Văn ChÆ°ÆĄng

2 Likes

Hi chuongmep,
Where could I get the Point.MidPoint package in your notes?

Thanks!

Brian

You can use Point.Average from Clockwork.

Think that one is from DynaMEP

1 Like