Dynamo create sheet and insert view wrong

Dynamo create sheet and insert view wrong

MarkNguyen...
Advocate Advocate
1,651 Views
4 Replies
Message 1 of 5

Dynamo create sheet and insert view wrong

MarkNguyen...
Advocate
Advocate

I have a Dynamo file that is used to create a sheet and insert a drafting view into that sheet at the same time. But I’m not sure where I went wrong, when I run the file it reports an error like the attached image.

12.jpg

0 Likes
Accepted solutions (1)
1,652 Views
4 Replies
Replies (4)
Message 2 of 5

MarkNguyen...
Advocate
Advocate

i send dynamo file

0 Likes
Message 3 of 5

TripleM-Dev.net
Advisor
Advisor

Hi @MarkNguyen... ,

 

I don't know about the specific Dynamo node module, but a drafting view can't be empty when placing on a sheet.

Any chance the drafting view that is being placed is empty that might explain the error.

 

- Michel

0 Likes
Message 4 of 5

RLY_15
Advisor
Advisor
Accepted solution

Posting the graph here for others' convenience, not sure I'm getting to a full and proper response with this post.

My screenshot's got a flood of errors because I didn't use a template file with a titleblock family, I mainly ran it to check the initial python node and the accuracy of the List Filters. The second python node works fine when a titleblock family type is properly set.

 

Dynamo - Sheet create and Insert View_2023-05-24_04-21-06.png

My python literacy is pretty bad, so I'm taking a few educated guesses as to what this script is 'supposed' to be doing.

 

- Looks at the user's CURRENT selection to pick up a list of view names from the selection. I THINK the user is supposed to have preselected a list of views in the project browser, since that's the only way I'm getting that python script to output anything. It also sorts the list by name, so you're getting an alphabetized list.

 

- Looks at the full list of plan view names in the project. This list is compared against the user's selection of view names. I should note very carefully here that the comparison is on NAMES. There's multiple check layers that boil down to trying to get the view element corresponding to the user's selected list (I think this was meant to dummy-proof the script in case the user selected things that weren't plan views)

 

- There's a python script to generate what appears to be one empty sheet per user selected view, with a defined numbering system. As it stands, the numbering system corresponds to the alphabetized list.

 

- There's some math based on your standard titleblock size to place views on a particular spot on your sheet. Roughly looks like the centroid.44

 

- For each sheet, one view is supposed to be placed at the preset location.

 

-------------------------------------------------

 

So some straightforward questions now:

Have you successfully used the script before? 

If so, how and in what versions of Revit / Dynamo?

Given my description of what I think the script does, how does that compare against how you were trying to run it? Did you have anything selected before you hit Run?

Is the goal a sheet list with alphabetized naming order?

How do you actually WANT the script to work? In your perfect world, what do you give the script and what does it do for you?

Message 5 of 5

MarkNguyen...
Advocate
Advocate

Thank you very much, I have found the problem. The reason is that I did not select draftingview

0 Likes