Hi,
I’m having a lot of trouble with a Dynamo script i’m writing. I don’t think that the purpose of the whole script is not all relevant to my question but I’ll write it down in Italics just in case.
The purpose of the script is to create two views (a Front view and a Cross section of a selected column). These views are then duplicated so that I have a view for annotating and a view for modelling rebar. Each column has a code that is used to name the two created views. The duplicated views have the same name with “ref” added at the end. These ref views have Sections turned on in the graphic overrides so that they can be adjusted while modelling the rebar. This all works perfectly. The only problem is that if I run this script for multiple colums, the ref views show all the Sections that I have just created, which clutters the views.
I wanted to solve this by creating a view filter. I’m creating a view filter for each columns with a doesnotcontain-rule for the View name, where I add the code of the column. If the visibility of the view filter is turned off, all the sections that do not contain the columns code will be turned off. This View filter is then applied to the ref views of the corresponding column. This view filter are created correctly and applied to the correct views, so no problems here.
The problem that I haven’t been able to solve all day is that I just cannot manage to have the visibility of the view filter turned off automatically. They are created and added to the views, but no matter what I do they always have the visibility turned on. I have added a screenshot of the part of the script that creates the view filter. I have already tried switching the boolean value for hide to False, but to no avail.