Hey all, so I’ve been attempting to create a series of filter rules that will apply to to named views in this project. Each of our parts has a parameter named “Pour ID”, with a specific ID associated with each unique part (W-201, BS-101, etc.).
I’ve managed to write a script to make a “Does Not Contain” rule for each one, but when I run the script, it takes each rule and runs again for each Pour ID over and over inside the rule.
For instance, the filter “Not BS-302” should only have the rule “Pour ID does not contain BS-302”; however, it currently has “Does not contain BS-101, Does not contain BS-102, Does not contain BS-201”. It’s as if the script is rerunning the list of pour numbers each time it makes a filter – I only want to associate one filter with one rule/Pour ID.
I’ve tried several methods including indexing and trying to select the underlying element, to no avail. I’ve traced the source of the error back to the FilterRule.ByRuleType node, but I can’t figure out how to get these to only use the single appropriate Pour ID parameter.
Any help would be much appreciated!
Output (every filter has these same 3 rules):