I’ve recently started getting into the powers of Dynamo within Revit, and now I’m looking to automate a lot of the stuff we do on a project to project basis. Here’s the catch; 1) I’m brand new to Dynamo and to coding, so nothing is familiar. 2) What I desire hasnt seem to have been done before (just iterations of what I’m trying to achieve, and I have to revise their examples to fit my needs).
Which brings me to my question: Creating section views of specific elements within a project (ie: Doors)
I am trying to automatically generate section views of all my doors (a section of both the front and back, crop region will be the same for all views for consistancy, and so will spacing from the door to the section view line). I have found a tutorial of a guy who was doing this for structural columns/beams, yet modifying it to doors has been very troublesome, especially since I know not what I’m doing for the most part. I’ve attached my current workspace in hopes that others can point me in the right direction
Thanks in advance for your help, if you need any further info, please let me know and I will provide!
I just added more to the script as per the tutorial I was watch, but with no real success. I am going to upload my dynamo project here in hopes that that helps the community better help me
So i’ve had another go at this after looking at more updated tutorials, and this is my current workspace. It is said to work for most any generic model, but I cannot seem to get it to work for anything! I plugged in my door, pressed run, and all it does is leave a copy instance of the selected family that is blue in color and cannot be selected. When i select another door and run the script again, the blue copy moves away from the previous door, and does the same to the newly selected door (all while not creating a single section view!)
No idea where I’m going wrong, hopefully your more experienced eyes can tell;
As you can see in the 3D door perspective, the top door was the one I selected for my “Select Model Elements”, the bottom door is what an unselected one looks like. As you can see, my current script just adds a blue duplicate in the same place as the selected door (this blue duplicate cannot be selected or tabbed or nothing, the only way it disappears is if I run the script again on another door… at which point it just creates the blue door at that location)
Any help would be much appreciated!!
Thanks in advance,
Rob
What is your goal?
Do you only want isolated views of your doors, or do you also want surrounding parts (walls for example) to be visible on your section views?
My end goal is to be able to select specific doors (through the comments of the door, ie: Select all doors with the comment ‘Access Control Door’, or something along those lines).
Then, I want it to automatically create 2 sections of each selected door - one front, one back (showing all surrounding elements - doors/familys/backgrounds/etc).
End goal - To have 2 section views of every door I select automatically generated as we currently do this door by door (on a project with 100 access control doors, would be VERY HELPFUL to just be able to select those 100 doors, and have those front and back section views automatically created (and even better if they could automatically populate on sheets - maybe 8-12 views per sheet)).
I’m not sure if this is the right input for the above workflow, but it does the selection based on a parameter.
I used the “default - advanced” Revit sample project, and put your parameter in two of the available door types.
Second step: naming the views
This depends, on how you would like to name the sectionviews. By default you have to put a parameter “Mark” in your families, and then sections wil get names like:
Cross - “Mark”, Front - “Mark” and Side - “Mark”
Maybe you can give an example of the names you would like to give to your sections based on a “family parameter”, or the “familyname/type or parts of it”.
Fooled around with the dataset you posted to isolate just the doors I wanted, and its working out perfectly. Just did a test project with 5 doors, and 3 of those doors had the comment “Access Control Door”. When running the script, it only picked up those 3 doors, so that part is working out well. Step 1 of getting this to work completed!
As for your next question, I’d like to pull the parameter from the door tag (we pull this information for this tag from the “Mark” section in our door families). A typical example of how I would like it named (or close to named): Front Elevation - Door D3101J Rear Elevation - Door D3101J
Essentially the front and rear will be which side the section view is on, and the D3101J (Mark) is the door tag identification. This way there is no confusion on which door is which when creating a bunch of views as there is only 1 unique tag per door, so this would be a good way to identify. I believe I have now edited the “Definition of the view names” group in my dataset correctly for this part with the proper suffix and the two view names I’d like generated.
The trouble I seem to be having is that I only need section views created of the front and back of these doors (I do not need a top view or side view created), but I am not exactly sure on how to tell Dynamo that those are the views I want created?
* Additional information *
So I ran my new script using your new selection data set in the front rather than just selecting individual elements, and it is now placing that unclickable blue door at all the selected instances (as per the picture below). These blue door disappear once the Dynamo script is closed down. Still, no section views are generated currently using this script (as seen below):
Hopefully we can continue to build onto this script throughout this thread, and one day have a super version of Dieters due to all the communities help and opinions coming together.
Thanks in advance for taking the time to read,
Hopefully I can get some help to push this along further.
The blue doors indicate that Dynamo is at work, but for some reason can’t finish the job.
In my sample project i managed to get 3 sections (should have been 6), so there is still hope.
I see you have already covered the naming part, for now i’m still using the default naming section.
So in my case this part of the script get’s me: (two doors) x (3 sectionnames) = 6 unique sectionnames.
As i said it only generates 3 sections and then crashes (sometimes Dynamo tells me it’s out of unique names).
This made me think… there should have been thee names left.
So i put watch-nodes at the end of the nodes in the lower part of the script to see how many items were in the output lists of the nodes. “Definition of the view names” number of items OK, “Element subsets” number of items OK. But then the “Views Center Point (solid centroid)” the first node Element.Solids gets me a list with a lot more items.
I’m (totaly) not familiair with doors, but is seems that default Revit doors contain 3 separate solid parts.
This could be an expanation why it runs out of unique names.
When you run the script, can you confirm how many items you get from outputlist of the Element.Solids node?
Sorry i’m not near my Dynamo computer, so i can’t post pictures to make things more clear than the above story.
So I put a watch node from element.solids and it ended up generating a list of 6 items (0-5). Currently I have 3 doors selected for my test, so its giving 2 items per door (im guessing these items are my front and back view)? Each list it gives me from the watch node has 5 items part of it (0-4), these items are all named Solid (as shown in the picture below).
So I just pressed run on my script this time, and its giving me 5 section views (3 front, 2 rear). Problem im now having is 1) where is my 3rd rear elevation? 2) all 3 of my front elevations show as a top view rather than the front of the door? 3) All my sections that were created were created of the same door not multiple doors.
What node should i change so that my front elevations are actually at the front of my door rather than overhead (current script is below)?
Bumped in hopes of more replies. Still cannot get it to populate my section views in the right orientations. Can anyone please look at the above workspace and tell me where I went wrong?
Or, let me know if I can provide any additional information in order to help you help me better! Seems that I am close, but just cannot seem to get it working as intended.
Thanks in advance for taking the time to read through the thread and spend the time helping, it much appreciated!
Rob
A few days of silence…
In the meanwhile i have done a lot of testing and editing.
Maybe you can check the attached .dyn file, and see if this works for you.
I am testing out your workspace in the coming hour or so, and will let you know how I progress Thank you a ton for taking the time to help me out on this one, not only am I learning, but this script has been making real progress since I’ve implement some of your tips and tricks
Will let you know in a little bit how it goes, just wanted to let you know that I have seen this, and I am very thankful for your continued help
So I opened up your workspace and it says you have a custom node in there called “Create Element View_edited by MJB v03”. Was this something you could send as well, or is it no different than “Create Element View”?
If you rightclick the original version, and then click Edit Custom Node… it opens a .dyf file.
Then click File | Save As… (upper left), now you see the directory location where the above file should be located (Cancel before you are actualy saving the original file).
I hope you can solve it this way.
So I had the time to look at your script and get your custom node loading perfectly, and WOW what progress!!! All section views are created at all the right doors with the proper name. Just a few more tweaks need to be made in order to get it exactly how I imagine it;
Currently, the section views are created on top of each other. Is there a way I can put an offset to each one so that the front section is a set distance away from the front, and back is a set distance from the back of the door?
2) A blue door overlaps my current door (see picture below). Is there a way to avoid this? Even when closing down dynamo after running the script, the blue doors still show. Or will these disappear after closing down and opening the project?(COMPLETED - BLUE DOORS DISAPPEAR ONCE YOU CLOSE AND RE-OPEN PROJECT)
Are the sliders used to control the height and width of what the section see’s? Currently, the view created is pretty much the size of the door. Id like to have 3-4’ on each side of the door, and another 3-4’ above the door, this way it gives me space to detail the door.
If I can figure these 3 things out, I can official mark this workspace as completed and it can be used in future projects! Until then, still some tweaks to be sorted out.
Currently this is what it looks like (Top View):
How I would like it to look (Top View):
Currently this is what it looks like (Section View):
How I would like it to look (Section View):
Hope this is enough information to help in getting this workspace completed. As always, if theres anything else I can provide, please let me know!
Cool that the workflow is starting to work for you.
I wil have to check if the position can be manipulated (this may take some time).
Solved
This can be adjusted by the top slider (the input is in millimeters), so you have to translate your value to mm. The boundary offset is around the element, so it wil be the same at the bottomside. As far as i know you can’t change that it takes another input for the bottomside.
If i have some news on the first point i will let you know.
Ya, I’m really excited as I see it piece together.
Thanks, as I have no idea where to even start for that will have a go at it myself and let you know if I have any successes but I’m not very optimistic on my end ahah
Solved
Ya, would be cool to be able to have a slider for each side of the section (Top, bottom, right, left), or at the very least, be able to manipulate the bottom offset to bring it up just below the door. I have no hardware that goes below slab, and I’d have to go and adjust each view manually as the view would show too much on the bottom half. Maybe some sort of code that takes those newly created views, and brings up the bottom offset 3" below slab (without affecting the bottom offset of previously create views).
I will also look into that and see what I can come up with.