Viewport generation into a Sheet issue

Hi everyone,

I am new to dynamo and trying to figure out to add a view to a specific sheet. I have setup the attached script, was able to filter the sheet and view that I want and get a specific point to for placement. However, I am not getting any results on the actual view showing onto the Sheet. Also, I am getting a warning of “dereferencing a non pointer” which I am not sure how to fix.

Hoping someone can lead me to a solution? Any help is much appreciated. Thanks

I am currently running Revit 2024; DYNAMO v.2.17.0.

If you check the all elements of category node you should see some null values; these are triggering the warning. You can add a list.clean node to fix it.

I can’t see what the last node is but your script worked for me using Viewport.BySheetViewLocation instead.

Welcome to the forum!

If you zoom in on the screenshot you posted, you’ll see that none of the node titles are visible. This, as well as not being able to see the outputs of your nodes, makes it very hard for us to tell what’s going on. When sharing screenshots, make sure you have all your node preview bubbles pinned and that you’re using the Export as Image button to create your screenshots. Export as Image will include the full workspace (regardless of what’s currently visible on screen) so you just have to make sure you’re zoomed in enough that text is visible and legible at that scale.

As for your current issue, it looks like you’re correctly checking view names and filtering the elements but then filtering the sheet numbers instead of the elements. Right now you’re trying to place a view on a sheet number.

3 Likes

Thanks for looking into this @willyoungMF8K3 . I have substituted the “Sheet number” to “Sheet name” filter and the last node to Viewport.BySheetViewLocation similar to what you;ve done, however I am getting a warning on my end. Also, I havent used list.clean before, I will have to look this up. Where does this usually attach to in the script, is it prior to the affected node or as a filter after.

Really appreciate the help mate. Cheers

Reading the warning/error and checking your node previews can solve a lot of problems. I’m guessing the warning is saying that you’re feeding the wrong input type. If you look at all the inputs you’re giving the BySheetViewLocation node, something probably looks off.

1 Like

I got it to work gents, thank you for your help in clearing up some items. I am currently working on the standards while getting to learn to automate stuff. I figured the Naming standard here would be fixed for Sheets and Views. So I simplified the script by directly attaching the Sheets and Views node instead of filtering through and was able to get the result I need. I just need to find out how to remove the title of the viewport once its placed - to select a specific viewport type.

The next step for me is to figure out if I can automatically create this view next to automate the process. Good luck to me :slight_smile:

Have a great day ahead.

1 Like