Here’s a fun one; I’ve been racking my brain around it for hours now. My engineers use red text on sheets as messages to the next person who opens it. However, when we print, I want only the red text to be hidden on all sheets (and eventually I’ll turn them back on). I’m trying to automate it so it’s a mindless function in the back ground.
So far I’ve managed to find all the red text styles in my drawing, but Views.HideElements is either not accepting the elements I’m giving them after the filter, or it doesn’t like the Sheets.All output.
Suggestions? I’ve also tried View.SetCategoryVisibility from MEPower and View.SetCategoriesOverrides (which works but won’t accept my filter).
Notice also, I looks like I’m picking up many many more text styles than what’s actually in Revit.
yes thats great…now you have these element there have red in name…out in filterboolmask will give you the other…you can tjeck with an element name after your unique items…
Got it! Scope.If is amazing!
I have this tied to a user interface (Data.Shapes) and when the boolean input is true, it turns it all off like I expected. Thanks!
One thing to note is that for ScopeIf to work, you need to ensure the two branches (i.e. one going into True and one into False) don’t interact with each other
Hmm… I am noticing that for Scope.If, if it proves false, the graph still runs. What I’d like to happen is if Scope.If reads a false, the remainder of the graph doesn’t run.
ScopeIf will choose which part of the graph to run. There are two ‘branches’ - the true one and the false one, and it will only execute one of those based on the boolean value.
We recently updated the description to explain better
What this means in practise, is that the nodes on both branches before ScopeIf will show null results, and only ScopeIf will show a result.