Edit family properties with dynamo

Task
I have several window families in a project. I wanted to mark window openings with a dotted lines

Method
I added dotted Lines in family and gave it a visibility parameter called Linie_Rohbauöffnung. I also made visibility settings so that its visible in all except plans

Problems
There are two
P1. Frames are doing good on the front elevation. But, on the edges ( right and left sides ) the lines are visible. Its because the Workplane of Family where they are built is changing thickness due to Insulation

Q1. Is it possible that the lines are only visible on the front, and not on the sides ?



image

P2. My colleages sometimes asks me to turn off these frames ( some technical reasons ). Instead of selecting all families and filtering windows, I tried this quick dynamo script. It worked fine when I turn the values from 0 to 1 initially. But when I turn them on from 1 to 0 again, it gives an error that the model is busy. I turned on some tick marks manually with a click, but ideally it should turn all values to 1.
Q2. I need a one click solution to turn on-off all opening-marks, is it possible ?

Thanks

I don’t think you need Dynamo for either of these, but let me know if you had something else in mind.

A1: You show the element visibility settings for the lines in the second image. Why can’t you just modify those to not show in side views?

A2: I’d just give the visibility a type parameter that can be toggled on/off in the project as needed. If you have too many types to manually change then you can write a script to do it for you. You’ll have to get all the family types from the family and then toggle the type parameter.

The Data.Gate node is for transferring data to Revit through Generative Design. You don’t need it here. You’d just toggle the value between 0 and 1. You could include a user interface to make the selection in this case.

Thanks a lot Nick,

Q1: I modified the visibility settings and now the elevations look much cleaner. I will leave it to that now.

Q2: So I followed your advice and made the visibility of dotted lines as Type Parameter. ( Previously I had it as Instance Parameter ). Now, I can select each family, extract its Family Type, and run this script, and it turns on/off dotted lines in all instances. Till here it works fine, its just that I have to do it 10 times.

I have approx. 10 window-families that I am using in facade, compared to approx. 30 window-families in project that are not of my concern here. Meaning only 10 out of 40 has the dotted line parameter. Is it possible that I can select all the window types that have that particular parameter? I tried selecting Filter.ByParameter, ( Is there any thing like filter Family-Type by Parameter ?

ps. In grasshoppper there was something similar to Data.gate to turn on/off data without disconnection. Is there anything similar in Dynamo ?

I would start by getting the family types from the family rather than all the instances. It’ll cut down on run time and could help with avoiding the other 30 families. If you do this manually you can just select the families with the dotted lines and not worry about the rest. You could also do it by category so that you always have exactly what’s in your model.

If you do it by category and still want to filter each type, you could just check for blank parameter values and use Filter.ByBoolMask. Any element with a blank value is missing the parameter.

The Data.Gate node is for gating data like you’ve mentioned, it’s just usually used specifically in Generative Design graphs that eventually push data to Revit, but you certainly could use it in this way. Normally you run Dynamo in Manual mode, so you don’t have to worry about data continually updating. Nodes also only execute when there is a change to their inputs. If none of the inputs have changed or been refreshed, the node won’t rerun.

Hey, Thanks a bunch. I achieved what I wanted to do. Here is the script.

However, I was wondering if there is a way to multi-select families with one node. Here I had to link each family separatly. In grasshopper, you could Shift+select multiple items. Is there something like this in Dynamo ?

@hassan.orion Why don’t you link the Linien_Rohbauoffnung parameter to Global Parameter(s) within the project itself? I think that would be more user friendly to your colleagues, and no need to run a Dynamo script to do it.