Hello, I am trying to copy a hanger family linearly but it is not working the base level and top level offsets are getting messed up somehow. I tried copying them in from the parent to the derrived families but it seems to have no effect and those parameters always come in blank. I know this looks funny but I just tried to copy the family to the same place to show what the problem was, see how it is created on the level below?
Im also attaching my script. Anybody have any ideas?
Never mind, I found the familyinstance by point and level node and made it work. Now my only question is how do I change this code block so that the number created by this script is a variable and not a static 2 instance code? any advise would be greatly appreciated. Thanks!
Can you elaborate on the question? It will Cary now based on the result of the slider inputs.
yes I got it to carry through. The script, tells revit to create two extra instances of a variable distance apart in a linear direction, in this case Y. but I want to make the code block make a variable number of instances at a variable distance apart, but I cant. Thats my question.
Ah! Math.Random is the node you seak. It has some sibling nodes to allow for a random integer between two values as well.
I love your enthusiasm! haha but that’s not what I meant either. Admittedly, it is what it sounded like. Sorry about that. What I meant by “variable” is “a variable”. meaning a variable in the equation, so that I can feed a known value into that variable. The code block doesn’t have an input for how many copies I want it to make. I want to create one. My question is how. right now I have am making a new line of code for every hanger I want to create, I dont want to do that. does that make sense?
Since they’re all going in the same direction you should be able to create a list of distances with no problem.
For n
number of hangers create a list 1..n
and multiply it by your distance y
.
Thanks Nick!