A note for others using this: in addition to Views that are not on sheets, this also removes ALL View Templates (since they don't have a Sheet Number parameter). Not a big deal when you're archiving or sending to others, but it did make for some extra work to restore the VTs when I ran it on a file I didn't want to. One of those rare times I wish I knew Python coding so I could add that exception to the script.
@RVBoost5 ай бұрын
Sorry about the deleted view templates! That was indeed an oversight on my part. If you use the RV DeepClean plugin mentioned in the video, the view template will be safe. If you prefer to stick with Python though, simply add this to line 56 of the Python node to exclude view templates from deletion: if v.IsTemplate: continue
@HippieP6297 ай бұрын
Thank you so much for this video. Is it possible to add user initials with a dash after the view name like "VIEW NAME - AZ", for instance, to the "don't delete" list??
@RVBoost7 ай бұрын
Yes, Python can do that! Just search for "regular expression in Python" to see how you can add that logic to the script. I'll also add this as a new feature to RV Deep clean soon, so thanks for the idea! 😀
@HippieP6296 ай бұрын
@@RVBoost So after opening your downloaded file in dynamo, the only thing I changed in the Python script node on line 48 was ["do not delete", "important view", "level 1 - mp", "level 1 - st", "level 1 - yz"] I get Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed. Traceback (most recent call last): File "", line 92, in Exception: One or more of the elementIds cannot be deleted. Parameter name: elementIds Line 92 is tr.Commit() I'm brand new to python and don't know how to correct this. Thanks
@RVBoost6 ай бұрын
The error suggests it couldn't delete some elements. These are probably system elements that Revit protects. You can try to delete elements one by one to see which item caused the error.
@varvara.g Жыл бұрын
Hi! The link with dynamo script doesn't work - I subscribed but didn't receive file
@RVBoost Жыл бұрын
Sorry about that. If you have checked your spam/promotion folder and still can't see it, please email support@rv-boost.com so I can send you the file.