Revit Snippet: Instantly Delete Views Not on Sheets but Keep Parent Views

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 8

  • @TheCADiva
    @TheCADiva 4 หลายเดือนก่อน +1

    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.

    • @RVBoost
      @RVBoost  4 หลายเดือนก่อน +1

      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

  • @HippieP629
    @HippieP629 6 หลายเดือนก่อน

    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??

    • @RVBoost
      @RVBoost  6 หลายเดือนก่อน +1

      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! 😀

    • @HippieP629
      @HippieP629 5 หลายเดือนก่อน

      @@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

    • @RVBoost
      @RVBoost  5 หลายเดือนก่อน

      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
    @varvara.g ปีที่แล้ว

    Hi! The link with dynamo script doesn't work - I subscribed but didn't receive file

    • @RVBoost
      @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.