Automating Section Views of an Element

Hello Dynamo community,

I started off this workspace in a previous post (see picture below), and it got lots of attention. After over 20 posts, I have been stumped, and decided to make a new topic on my specific problem - This way, the community doesnt have to scroll through post upon post to grasp what I’m now trying to achieve.

In short, my workspace selects a given element based on the comment it has (in my case - doors that have the comment - Access Control Door). It then selects all these elements, and creates a front and back section view of them. I’ve gotten the workspace to create section views at all the doors I want it to (with the correct naming), but the way it looks on the floor plan/section view is what I’m not happy with. Here is where my 2 problems are that I need help with before I can be happy with the end result;

Problem 1:
It creates both section views (front and back) directly on top of each other (see picture 1 below). I have my first slider which allows me to put an offset to my section, but it seems to offset them both the same way, rather than each one offsetting opposite directions (see picture #1) I am wondering if there is a way for me to set offsets on each of the section views individually so that they both offset to the right direction like picture #2? If so, how would I go about doing this?

Problem 2:
My 1st slider also increases the space that the section view see’s. The bigger the number on my offset slider, the bigger the view gets in all directions. Problem is, the bottom offset is too long, I only need to show acouple inches below the door. Is there a way I can offset the bottom so that it shows just a few inches below the bottom of the door (rather than well into the second floor like picture 3)? If so, how would I go about doing this?

Door Workspace - Sorry its all bunched up, I had to shrink the size so that the text showed:

Picture 1 showing what the section view currently looks like on floor plan when running my script:

Picture 2 showing what I would like my section views look like on a floor plan when running my script:

Picture 3 showing what my section views look like after running my script:

Picture 4 showing what I would like my section views to look like after running my script:

Thanks for taking the time to read through my issue, hopefully with the communities help, we can complete this :slight_smile:

1 Like

Bump,

Any additional information I could give in order to help you (the community) help me, please let me know. I’m really stuck on this and I am not even sure on where to start to achieve what I’m looking for to solve my 2 issues.

I’ve tried every search on the internet in every way possible, and have come up short in my findings. I believe if we can complete this script, it will open up pathways to a bunch of other cool things which automate project to project tasks.

Thanks in advance for reading,
Rob

Hi RAllan,

Here’s a script i’ve made for making section views over Manholes (I couldn’t figure out how to make plan views, this was the next best thing).

Sorry but I haven’t got time to go through it with you at the moment, really swamped at work, i’ll have a look through your script when it dies down a bit.

I made this before the element.localcoordinatesystem node was made so you might be able to simplify it.

You might be able to edit it to make it work better than the one you’ve made at the moment, maybe not, but good luck!
Create Views - forum test.dyn (46.3 KB)

I’m not sure the workspace u provided has the exact script for what I needed to achieve (distance my sections are placed from doors, and the crop region size).

Maybe I am wrong, but would you be able to shed some light if any of the tools in your workspace do that?

In the meantime, I’ll try to see if I can get yours to work with mine, but as of now in my quick play around, I have been having troubles

In order to get both the ‘front’ and ‘back’ of the door elevation, you will have to input two sets of vectors into the “Create Element View_Spectech” node.
In the ‘get local principal vector’ group, you can try to create 2 lists of local vectors that indicate the section views. For example,"+x, +z" would indicate a front elevation; “-x, +z” would indicate a back elevation.

@msol @Tom_James

Hey msol,

So, I’m not quite sure I have the Dynamo knowledge to do what your asking me to do. The majority of the above script is me piecing together existing Dynamo workspaces/help from forums as the vectors have been giving me problems.

Im not quite sure how to define -x, +z to my rear elevations, and +x, +z to my front elevations. Any help would be much appreciated. I have attached the file/custom node here in hopes that someone can open it up and have a look to better help me out here as this is super frustrating for me as a new user!

*** Still having the same issues as my first post ***

Create Element View_Spectech.dyf (39.0 KB)
Door Elevation Workspace.dyn (43.7 KB)

1 Like

Hi please see if the images below can help you resolve.

Also, as shown, I have added an extra node “Geometry.Explode” to the dyf by _spectech to make it work. You can double-click the Create Element View node to edit that.

1 Like

If you haven’t seen yet Dieter vermeulin has recently written this blog post https://revitbeyondbim.wordpress.com/2017/02/10/element-view-generation-in-revit-with-dynamo-revised/#comments

@Elton_Williams

Ya, its where I was able to get alot of information from in my first go at this script solo. I had another post in which a lot of discussion was had (over 20 posts), and so I started this thread to pick up from that discussion, but on a fresh board so people didnt have to scroll through 20 posts to get all the information needed to help. But ya, I did go through this and it helped a lot… almost there now, just 1 last thing to fix thanks to @msol

@msol

OMG! Thank you so much, you have fixed one of my issues I was having (see picture #1 below). After fiddling around with some of the boundry offsets, I was able to get it looking ALMOST perfect!

Issue #2 I am still having problems with - my bottom crop region.

All my crop region offsets are perfect except for the bottom crop. As shown in picture #2 below, it shows WAY below the floor, and we do not place any devices below slab. Is there a node that can be used in which you can plug in the created views and adjusted the bottom crop region of the views created when script runs? Or any alternative way in which Dynamo will raise the bottom crop region up to mid way through the floor (as shown in picture #3 below)?.

If I can figure how to do that, this workspace would be perfectly complete!

Picture #1: My Floor Plan View = PERFECT NOW! THANK YOU

Picture #2: My Section Views Currently = Too much show below the floor

Picture #3: How I want my section views to look

Hi Rob,

I think that @Elton_Williams meant to say that @Dieter_Vermeulen posted an updated version.
He added a new section (doors and windows) to his “element-view-generation” workflow.
it can be downloaded at the link provided by Elton Williams, but you also need to update the BIM4Struc_Productivity package.

I haven’t tested it yet, but i think it has a little bug (inside the “Create Element View” node).
If the doors have an angle other then 0, 90, 180, 270 or 360 degrees, (i think) it won’t create correct views.
For those who are interested see this topic.

Kind regards,
Mark

^ yes i did. Thanks for the link too

Hi
@MJB-online, @Elton_Williams , @msol, @RAllan

I just did a test on the orientation of the Doors. A wall that is oriented at, let’s say, 8° to the North, doesn’t give a problem anymore. There had been some problems in updating the BIM4Struc.Productivity package on the Package Manager. Which should be solved now.
The latest working version is 1.2.7.
Let me know if there is still an issue with it.

Concerning the crop region: the package only allows one offset for all sides. But it should be easily possible to add a new input and connect it to the right coordinates of the section view, to make it different. I’ll note that for improvements for another version.

Best regards,
Dieter Vermeulen
Tech. Sales Specialist AEC - Computational Design & Engineering
Autodesk, EMEA NE

Hey @Dieter_Vermeulen @MJB-online @Elton_Williams @msol,

Ya i did notice the updated version yesterday, problem is, its at about the same point of my script (where as it creates the views I need, etc), but that bottom crop region is still giving me an issue. I decided to just keep going with the workspace I had as it was already 90% set up to my needs (creates the 2 views I need, names them how I need), I just now need to figure out how to take those generated views, and raise the bottom crop region so that its just below the door.

Since i only needed to figure out the bottom crop region, I just decided to stick it out with my workspace and hope to find the workaround to fix my 1 issue.

Hopefully Dieter adds something to that workspace to adjust crop sizing after views are made, or someone comes up with a way to do so, as everything I’ve attempted has seen no results :’(

Hey again, @Dieter_Vermeulen @MJB-online @Elton_Williams @msol,

Am i even going in the right direction? I found the node’s View.GetCropBoxCurves and View.SetCropBoxCurves and have been trying to play around with them. I have gotten the curves of each view, as well as the start and end points for each view, but I am still not sure how to manipulate these numbers to do as I want (which is to raise the bottom crop region to just below the door).

Am i on the right path in figuring this out (see picture below), or do these nodes not do what I think they do?

Hey @RAllan @MJB-online @Elton_Williams @msol

This is exactly what these nodes are doing. You can find more about their use on this tread: Edit crop region

It’s not included in my workflow / blogpost, but what I would suggest is to get the curves, do some list management magic to translate the bottom curve, create a new polycurve from its intersections and the existing curves and then feed the exploded polycurve to the “…Set Curves”

[edit] now I see that you’re on that referred tread too already :smiley:

Cheers,

Dieter

Hey @Dieter_Vermeulen @MJB-online @Elton_Williams @msol,

Well looks like I have some playing around to do. All of the above is pretty new to me so will just have to wing it and hope for the best. Not sure how to figure out which curve is associated to the bottom, and also not sure how I go about modifying that bottom curve through nodes.

Guess Ill just have a whirl and hopefully it starts making sense as I go through nodes and such.

Any additional help/workspace pictures of help would be much appreciated. I feel like this part is out of my league in terms of my Dynamo Skill/Experience.

Been fooling around with this for the past 2hours or so. I was able to adjust the #'s of each the x/y/z on the start and end point using the Geometry.Translate node, but it didnt end up doing anything to the crop region of my views. I even did it to the extreme where I inputted -100,000 into each the x/y/z, and plugged that into the View.SetCropBoxCurves, and it still didnt move my crop region (even though when looking at the watch node, each the x/y/z moved by -100,000).

A bit stumped, not sure what the hell im doing wrong!

Hi Rob,

Maybe the below files do what you would like them to do :slightly_smiling_face:
I added some sliders to set the top, bottom and side offsets before the views are created.
There is also a slider to adjust the position of the section.
Create Element View_modified v06.dyf (59.0 KB)
Doors_Front and Back View Generation v06.dyn (54.8 KB)

Kind regards,
Mark

5 Likes

WOW @MJB-online,

Amazing work!!! It does exactlyyy what I was looking for in terms of the sliders.

Next up to take this script to the next level is to have all these created views populate on sheets for me as they are created (with equal spacing). Will have to do research and see what I can come up with on my own, and from there, post a new topic to get the ball rolling on that part of this workspace :slight_smile:

thank you again for all your work on this matter, would never have gotten this far without you! I think its at the point where I am happy with the workspace doing as I need it to do!

Where does one find the element.localcoordinatesystem node? Not included in 1.3.1 and I cannot locate it in the packages or on git.