Trying to Create Section Boxes for 3d Views


#1

 

 

 

This is what I have so far. Basically, I am trying to create a node that will read all of the views in Revit, go through each one individually and determine if it is a 3D view, and if it is, create a section box for that view through the “Sectionbox.ByElements” node. The problem/reason I have to create this node is because the “Sectionbox.ByElements” node can only create section boxes on the active view, and I simply need the node to search through all of the 3D views and create section boxes for all of them. I run into trouble with the If node. I am new to Dynamo and programming in general, and I assume I need a python script that will run the “Sectionbox.ByElements” node if the View.TypeIs3D node returns true.

 

If there is a more efficient way of completing the task I am trying to complete, please let me know! Any help is appreciated.

 

 

 


#2

You could try something along the lines of this?

2015-10-04_15-34-40


#3

I will try this first thing on Monday. Thanks for the help! I’ll report back and see what happens.


#4

Hey Dimitar,

So I tried your fix and it is creating a section box, but it is creating a section box around the entire array of elements. I will give you a run down on my project. Basically, I have a large array of model homes in one project. I need each model home to have one 3d ISO view, and I need that view to just be centered around that individual house, which means I need a section box to cut out all of the other homes. I also need to be able to see inside the house, so the corner of one side must be removed in the view. I got the 3d view creation part working, but I am struggling with the section box creation part. Your fix did create a section box, but the box encompassed the entire array of homes. I am looking for a way to get each individual 3d view to have its own “home-sized” section box, preferably with an offset so that I can see through one of the corners of the home.

Thanks for the help so far, and thanks in advance for any more suggestions.


#5

Hello Eric,

Did you filter out and feed only the required elements for each view in list1? In the example above, I basically fed all elements already visible in the view, so the section box encompassed everything. If you filter the individual elements for each house, it should work as expected.


#6

Hello again Dimitar,

So I now see your point about why it was creating one large section box around all of the elements. Above is my “solution” to filter out elements by house. Unfortunately, it still doesn’t seem to be working as planned. Two 3d views still has a large section box around all of the houses, one view isolated 2 houses (not sure why 2), and one filtered out everything except for one single floor slab of one house (keep in mind I only have 4 total houses in the project for testing). At this point, I am not sure what is wrong with the graph. I added a “list sorter” if you can call it that, to go through every 3d view individually and collect all of the elements within each group for isolation, but that doesn’t seem to have fixed the problem very well.

Is there something I’m missing? I feel like there is some node out there that allows me to just analyze each list individually in order instead of having to sift through the list with a “GetItemAtIndex” node…

Thanks again,

Eric Richter

 

 


#7

You’ll need to find a better way to isolate the elements of each house. What is your company standard? Do you use worksets, groups, selection sets or something similar to separate the individual structures? Here’s a quick example how you can split all elements either by their assigned worksets or by pre-defined selection sets:

2015-10-08_10-53-38


#8

It worked! This specific Revit project carries no specific company standards because it is an ongoing test I am conducting to make almost a sort of template for viewing families within a setting in Revit. And, like you said, the specificity was not there and dynamo got confused as to what to isolate. each house is perfectly isolated, and I decided to go the selection set route because I can choose to isolate certain corners of the house for a good iso view that reveals the inside of the room.

Thanks Dimitar for all of your help and for problem solving with me.

I look forward to seeing you around on the forum.


#9

Interesting… Dimitar: where should I place the filter selection by workset on your proposed nodes? I assume that “Workset”; would have to include the name of the workset I am trying to filter, right?

I tried to put that filter/selection group of nodes right before List Combine (which is before Input.Wait), but Dynamo crashed (08.2)…


#10

I’m not sure if currently there are any nodes or packages that filter out all elements from a particular workset. You can sort of do it with these two cool nodes from the clockwork package:

2015-10-27_13-06-25