Reset Element override

Similar to this question, but that topic is Closed
http://dynamobim.org/forums/topic/can-you-remove-or-reset-element-overridecolorinview/
I’m working on a graph to renumber my details on a Sheet.
What I’d like to do is color-code any duplicates that it finds (two Details in the same Zone)
Looks like Element.ResetOverridesInView is almost what I need, except that I’m working with the Viewports on the Sheets and that node doesn’t like passing the Sheet as the current active View.
Is there a workaround, or i that something I"d have to take up with Andy?

Hi @DaveP,

SheetView (or Sheet) and View are different objects which is why this will not work. I’m not sure exactly what you are trying to achieve either, could you be a bit more specific. Perhaps pictures or examples so the forum could get a better feel for your question.

Cheers,
Dan

2 Likes

As I said, what I’d like to do is color-code any duplicates that it finds (two Details in the same Zone
My graph changes the Detail Number for all of the Views on a Sheet.
I’ve borrowed a lot of idea from Nate Holland https://vimeo.com/150452601#t=41m28s
It looks at the location of each View and changes the Detail Number accordingly.
However, occasionally two Views can end up with the same number, which Revit doesn’t like.
I change the numbers of those & add "DUPLICATE " to the number.

I’m trying to make to even more obvious which one are duplicates by override the color of the View Title to make it jump out. I’m using Element.OverrideColorInView early in the process, but then I need in Reset some of them towards the end.

There. Now see why I was trying to keep the question generic? :slight_smile:

@DaveP,

Seems I was wrong, you can pass a sheet into the the clockwork node as your view. I just tested this and works fine.

See below for an example…

Can you please post any errors you are getting as well as a snapshot of your graph and where it is failing. We can’t understand what your particular issue is if we can’t see it.

Cheers,
Dan

Hi @DaveP

Are you looking to find views which you have duplicated?

@Kulkul,

I think Dave is literally just adding the string “Duplicate” to the detail number to avoid causing an error with the detail numbering when they are the same.

Might be easier to just temporarily renumber them 1 to list.length then renumber with the alphanumerical sequence. You are guaranteed to have no errors that way and no need to override and reset overrides.

Thanks, everyone.
I appreciate the advice, but this is exactly why I tried not to put too much detail into my OP.
My graph is working fine.
I have all the duplicates accounted for.
I will be using a Zone method for determining the Detail Numbers. I will not be changing our office standard.
I have accounted for duplicates by prefixing “Duplicate”

Daniel, it looks like your node Active View (py) is exactly what I need. I assume the (py) means it’s Python?
Is that a node in a package? If so, which one?
I’ve tried both the OOTB Document.ActiveView and Clockwork’s AvvtiveViewFromCurrentDocument unsuccessfully.

Hi @DaveP

Looks like your using those nodes in sheet environment. You can use “Sheet.Views+” from spring nodes pacakge to collect views in the sheets.

Hi @DaveP,

Yeah, I tried to use the OOTB node. Whack open a Python node and copy/paste this in…

import clr

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc =  DocumentManager.Instance.CurrentDBDocument

OUT = doc.ActiveView

Other packages will use this method too but more elaborate perhaps.

Cheers,
Dan

2 Likes

Kudo, Daniel!
That’s exactly what I needed. Thanks!

You’re Welcome @DaveP. :wink: