Missing Nodes for Purge Revit Script

Hi, Can anyone tell me where i can find the missing nodes in the attached image please?

I need them so that I can purge models, links etc from my Revit model,.

Kind Regards

@kieran.atherton ,

Here you can check your missing stuff

Use archilab package to obtain views by type.
There is an OOTB string.Contains node and ElementType.ByName can be replaced by Element Types.
Replace Logic.If by the OOTB If node or the Scope.If of Clockwork.

1 Like

Thanks Alban, can you tell me how to download the 2022 Archilab package because I cant seem to find it

For Revit 2022, The package version ends with 22.

can i download it through the package search ? I cant seem to find it through there

Yes it is available with the package manager.
You can also use the View byType node of the Genius Loci package that does the same.

I’m fairly sure the Logic.If node is from Zebra.

I just rebuilt a version of the script if it helps that uses my package only. Quite a lot of nodes in my package were made with model cleanup in mind, so it lends itself fairly easily towards it. Be mindful that some things in your original script are a bit iffy as they collect too much, for example the views collection process also rounds up the project/system browser as elements.

Purge model.dyn (69.3 KB)

This process is much faster if you consolidate some of those nodes together (e.g. the view/legend/template collectors are all filtering out relevant views from the same sized element collector in their body), so there’s some redundancy in there when it’s all put together. This version consolidates some of the repetitive areas of the code, but reduces overall code legibility:

Purge model 2.dyn (65.6 KB)

2 Likes

Much appreciated Gavin,

Hi Gavin, Thank for the help with the script,

When I run the script nothing happens. Any reasons why this is happening?

Many Thanks Kieran

Three possibilities:

  1. You haven’t set the toggles to true (off by default = safer)
  2. You’re running it in Revit 2023 without the IronPython package
  3. You don’t have Crumple installed

Beyond that it should work.

It seems to remove everything apart from views and coordination models for some reason. I need to save the navisworks 3D view for export purposes but was wondering if that was the cause.