I’m new to geometry control on Dynamo. I’m trying here to control all those distances using Dynamo for a parametric design. First, I drew the lines on Revit, exported their point to excel using the script (find attached), and then called them again from the excel file. My goal here is to generate this geometry on an empty Revit file with user control inputs on these dimensions. I’m not sure how I can do this or the workflow that I should set up to make it easy for me in later stages. The final result will be a Revolved Solid of the parametric profile. Any tips or workflow example on any of these dimensions could help me a lot. thank you. Attached below the excel point file and Dynamo Script.
Since you’re in Revit, and I’d wager you want to maintain and reuse some aspects of a controlled parametric form:
- model the sketch as a profile family.
- Set the dimensions you want to vary using parameters as you usually would.
- Load the family into the project.
- Select the family type for the sketch profile.
- Get the type parameters.
- Have the user set the values for each parameter (datashapes UI++ can help here - remember you can load in an image to map parameter names to a sketch as well)
- Set the parameter values to the given values in the family type.
- End the current transaction and start a new one.
- Read the geometry of the family (with the new parameter values)
- Build a polycurve and set the rotation.
You may want to consider using a sweep with a hosted profile to parametricly control the form without the use of Dynamo over time.
Thanks, @jacob.small for this amazingly detailed workflow. I love the idea of setting up a profile family and call out the parameters on Dynamo. My first concern for this method is if the user will need to have the profile family to be able to run the script? Is there some kind of node that stores or remembers the family within Dynamo without having to call it out from the current Revit project? The idea here is to just run the script in a new Revit file and the geometry will generate without any additional manipulation from the user.
Secondly, I have read a bit about Transactions (Point 5) when I’ll get there and maybe struggle, I may come back for you for further explanation about this particular step .
Hi…you could try to create your profile in a drafting view, and then transform the coordinates…here is an example…
Hi @sovitek thank you for your reply. Yes, I have already done this step, the question here is how to make this profile parametrical within dynamo. Actually, I’m trying the method that @jacob.small wrote me and I’m feeling that it’s the direction I’m looking for. For now, I’m creating the parameters on a profile family, and when I get to Dynamo, I’ll keep this thread updated for further reference and questioning. Thank you for your time.
OK then i will suggest what Jacob wrote
Yes - the family would have to exist in the document. It could be loaded into the document as part of the run (check if the family is in the file already first though).
In this case it will be really easy actually. Knowing why they matter is the hard part, understanding when you need them is the really hard part - in fact you might not need them here but I figured it best to include it Incase you do.
Get things built up to the end of point four, and you will have only one logical place to continue from - the result of the Element.SetParameterValueByName node. Then wire in a Teansaction.End node which will take the modified family type and pass it I modified through the output. Next add a Transaction.Start node which will take in the result of the transaction.end node (the modified family type) and pass the family type though it’s output. Then continue to step 6.
This sounds a bit complicated on reading but I think when I’ll get it there will be more clear for me, I’ll try to read it again and again till I figure it out.
For the family import, is there any node that allows me to import the family into Revit project automatically and the rest of the script will run normally afterward. Sorry for asking too much, I’m trying to automate this step so the user won’t need any particular knowledge of Revit to Run the script. Thank you @jacob.small.
I believe the node for that exists in the clockwork, archi-lab, or rhythm package (you should have all 3).
Yes, I do. If it exists I’ll find it, will do research about it. Thanks
Hi @jacob.small , So I have made it out To Step 5. I did one test Value to see how it goes, it’s working, i mean the value is written inside the Profile Family but the problem here that it doesn’t update. I need to save the Revit file, then entirly close Revit, open the project again, run the script for and the geometry with new parameter is loaded. Is there any way to make the update instant?
PS: I still didn’t really understand what the transaction end-start do exactly, as far as I get it, is it set to like restart the entire script with the new inputs?
In the last two screens, i tried to generate the geometry again, but the python script fails with an error. I didn’t understand why, since i’m calling in a family type, it worked with the first node
I have solved the issue with the error in the node, was stupid, lol. The script doesn’t deal with a list, the solution in the screenshot above, sorry
And still, couldn’t find out how to update the view when I make the changes
Does Element.Geometry work for obtaining the curves? Can you post an RVT with nothing but the family in question in it and your graph as it stands?
Hello @jacob.small did you have the chance to give it a look? I’m still wandering around and tried a bunch of methods but none is working for me. I’m out of ideas and almost opened every single youtube video and forum talking about family manipulation especially inside a project (I didn’t find much about it). I’m not sure what I should do in this case, it’s important that the model geometry instantly updates when I do changes to the parameters. Thank you for your time
Didn’t have time today, and didn’t see the response until late last night. I’ll try and get into it over the weekend. It may take creating an instance as one thought.