Beginner help for Dynamo/Revit


#1

Hi all, I am novice at Dynamo, and am a recent graduate engineer in structural engineering. For the last day, I have been trying to figure out how to create a structural floor plan view in Dynamo, using an existing level as input. However, the routine never completes. See jpg below.

 

 

Floorplanerror

 

 

 

 

 

 

 

Do I have to enable structural discipline in Dynamo? In Revit? If in Revit, how could I so that without creating a floor plan view to change the discipline? Is there a way to do this automatically within Dynamo?

 

Any help would be greatly appreciated.


#2

Structural plans are a separate view type in Revit and unfortunately Dynamo can’t create them with the default nodes. You could issue a new wish for the functionality here:


#3

The previous post mentioned the the default nodes cannot create structural views. But is it possible to create a Designscript code block to do it?


#4

You’ll need to access the API to accomplish this and the only way to do that is through a python script or through a c# library. Currently DS does not have access to the API. Here’s a quick example on how to accomplish it with PS:

2015-07-02_10-46-02


#5

Hey Dimitar,

Do you know why this doesn’t work for Revit 2015?


#6

Hi Jimmy,

Are you getting any particular errors?


#7

Getting the below error. Works as expected in 2014.

Structural Plan Error


#8

Looks like Dynamo is failing to locate the Structural Plan view type. Could you connect a watch node to the List.Filter’s “in” to confirm?

Hmm, the above should work in R15 and will most likely fail in R16. I don’t believe view family type names get localized…


#9

You are correct, below is the a screen shot from 2014 and 2015.

2014

Structural Plan 2014

2015

Structural Plan 2015


#10

The above is working on my version of R15.Weird. We can run the collector inside the Python node but the result would mos likely be the same.

Could you try running to following for me?

2015-07-24_11-35-30


#11

It might have something to do with how we have Revit set up. Running that I get the below. We don’t actually have a type that is called “structural plan”. But when I use something like [20] “framing” which is a type we’ve made of a structural plan then it works as expected, creating a structural plan under the type “framing”

ViewFamilyTypes


#12

I see. That would most likely be it then.We can run the collector inside the python script and make it more robust:

2015-07-27_09-47-18


#13

Nice one Dimitar that works. If the view name already exists it won’t create another view though. In your first script if the view existed it would suffix it with (1), (2) etc.


#14

Not sure why that’s happening. It gets suffixed on each run on my side.


#15

It’s quite strange…if I run it on for example Level 1 and a Level 1 plan already exists it will create Level 1(1), if I try run it again nothing happens. If I switch to level 2 and run it I get a Level 2 plan. Now if I go back and select Level 1 again, it will run this time and create Level 1(2). But again, running it with Level 1 selected, nothing happens.


#16

Alright Jimmy, now I understand what you mean. This is actually a Dynamo feature. A node will not get re-executed until the inputs change. You have two options to circumvent this.

You can either have a dummy input that you change each time before you run the node. (like let’s say a boolean toggle) Or you change the code.

option 1:

2015-07-27_16-09-57

option 2:

2015-07-27_16-12-08


#17

Oh that’s what it is. I’ve been wondering that, I’ve found it with other graphs. I thought it might’ve been a bug, but glad to know it’s just how Dynamo works.