I have a question about dynamo in Revit.
First of all, I want to mention that I am completely new in Dynamo and have just started learning it.
So my first issue is:
I am trying to perform the automatic bringing the holes to the position of the middle point of panel
The main problem is that the positions of the panels and holes are not displayed in the correct coordinate system in the project. dynamo cannot recognize this. The holes are void extrusions inside the family and they have their positions relative to the panel.
Unfortunately, it will not work because the opening is inside the family and has its own dimensional family parameters in the family(curtain wall), as i mention in the last post .
The biggest problem for me is how to connect coordinate system between those families, curtain wall and air terminal? My idea is that the opening follows air terminal.
Instead of building a point from the panel’s parameter values, you want to find the location of where the opening would place if given the 0,0 value - ideally this is one corner of the panel, as then you could use a series of Topology.Verticies, List.GetItemAtIndex, and Vertext.PointGeometry nodes.
Not really, as the amount of time to rebuild your family and create an instance in a way like you have built in a project is pretty significant and requires making a lot of assumptions, one or more of which will ultimately be wrong. I can give a list of steps I would follow as a first attempt.
From your selection, use a Topology.Verticies node to get all the vertices of the shape.
Then use a Vertex.PointGeometry to get the points as something you can see.
Use a List.GetItemAtIndex node to pull the point which aligns to where the opening would be if you gave it values of 0,0. It will help to disable the geometry preview on other nodes.
Build a vector from this point to the penetration’s point.
Pull the Z value from that vector - this is the first offset distance.
Hello,
The first three steps i solve it, but the others
unfortunately, i just cant. I found the points on corners of the panels but i dont know how to use vectors in dynamo in this case. How to connect air terminal and this holes and that corner and make them move as i want
Ok,
I finnaly got the positions.
In the end I used the line node so you can see where i need to move with holes. Now, my question is, how do I move those holes to the this positions?
Holes are actually voids inside the family. Can you please give mi some hint
Keep the line for now, but use a Vector instead. This will get you a meaningful offset faster. Vector.ByTwoPoints I believe is what you are after.
After that, pull the X and Y component from the vector with a Vector.X And a Vector.Y node. Those values need to be added to the current opening offset - so grab the opening location parameter X and Y values from before, and add the result of the Vector.X and Vector.Y nodes. These are the new values to use in an Element.SetParameterValueByName node, which is the last step in the process.
The problem is that I can’t get the correct positions on the x axis. Everything turns out well when the air terminal is in the middle of the panel.
What am I doing wrong?
Can you post your graph and a sample Revit file with two panels - one which works and one which fails? Narrowing the issue requires a bit more insight than the images are providing. If you can’t post here yet any online host will work (google drive, onedrive, box, Dropbox, etc.).
I sent to you a project file with two panels and dynamo script. So when you run the script, The panel holes do not move in the x-axis direction properly.
Just to mention once again, I would say I am very close to a solution but I can’t get an alignment in the x axis. So you Can take a look at the files to see what can be done.
By the way, I’m interested in one more thing. Is there a way that the air terminal can recognize the panel as spaces because I have to insert them in a certain order to make the lists match. Just a hint and which nodes if is possible.
Hello again,
I am pretty desperate with this problem. I can’t make my points fixed. i want the starting point for moving the holes to be in the lower right corner of the panel. However when I click run, my points move to the left corner, as you can see on picture
The final result is that dynamo calculates the movement of the holes from the wrong position and I actually get the mirror position from the right position along the x axis