Placing Panel Schedules on Sheets running into Element error using Bynamenumbertitleblockandview

I am trying to place panel schedules on sheets. I am running into the error of inputting an element into the view box in the Byname. Has anyone used a different node to create the sheets then place them on a sheet using a different node. For the life of me I cant figure out why I cant get a panel schedule on a sheet

I use the Viewport.Create node without issue. What is the error you are getting?

Warning: Viewport.Create operation failed.
Method not found: ‘Int64 Revit.Elements.Element.get_Id()’.

image
@staylor

You’re creating a sheet and trying to use it in the same transaction. That can be problematic as the viewport node may be trying to access the sheet before it even exists in the model. You can use a Transaction node to force the sheet to be created in an initial transaction before accessing it later in the graph.

You also have two nodes attempting to create a sheet with the same Sheet Number, which is not allowed and probably why the other node is erroring.

@Nick_Boyts Where would I place the transactions? I looked online but I don’t necessarily understand how you pair them up

Place transaction end node between the sheet creating node and the viewport create node. But as @Nick_Boyts states, you have to delete the sheet creating node that is not passing the sheet to the viewport create node. Revit does not allow two sheets to be named exactly the same.

I have changed it around and I still am getting the same error as before. Warning: Viewport.Create operation failed.
Method not found: ‘Int64 Revit.Elements.Element.get_Id()’.

Is the sheet actually being created or is it passing a null to the Transaction. Also, make sure the sheet doesn’t already exist in the project since you have run the script multiple times.

The Sheet is being created. And I am deleting it after each RUN cycle

I pretty much mimicked your graph and ran without issues. You may can try closing the graph and Revit completely and then reopen and retry. Unfortunately, I am not knowledgeable enough to decipher the error beyond this point. Apologies.

What version of Dynamo are you using? I am on Revit 21 when the package is set for 2023

Do you know what the best way to put Panel schedules on a sheet. I am finding that they are more a type of element vs “view” so they aren’t compatible with the name number and title block node

What version of Dynamo are you using? I am on Revit 21 when the package is set for 2023

I was testing in 2.12 in Revit 2022, but I was also placing a normal schedule and not a panel schedule, so that may be different. I have used that process since Revit 2020 with no issues. You may want to be careful taking packages coded for 2023 and trying to run in earlier versions of Revit. There have been changes to python as well as to the Revit API that will affect the execution of certain nodes in certain versions of Revit.

Do you know what the best way to put Panel schedules on a sheet. I am finding that they are more a type of element vs “view” so they aren’t compatible with the name number and title block node

Unfortunately, I don’t deal with Panel Schedules in my line of work, so I can’t answer that question.