Creating a schedule that shows what sheet Panelboard schedules are on using Dynamo

It not completely done but I am getting close. So I was able to gain the panel board name info as shown in the watch node. Now I need the sheet that each panelboardinstance occurs on and I will be set. It was mentioned that I can use the schedule ID to accomplish this.

I’d just put “ScheduleId” as the propertyName input for Element.TryGetPropertyValue so you don’t have to do any list management afterward :slight_smile: Once you have the ID, convert it to an integer using String from Object and then String to Number. Then you can use it with the Wombat node Element.ById to get the schedule view.

So the part you’re close to getting now is which schedule is which instance on a sheet, and the bit you’re missing is finding out which sheet the instance is on. You can get the sheet from the ScheduleSheetInstances with Element.OwnerView from the package Clockwork

Would I be using the Panelscheduleinstances instead of the ScheduleSheetInstances when using Element.OwnerView.

Also thanks for the tip. That eliminated some nodes.

It seems that I am still running into the issue of trying to get the sheet number to show up :frowning:

Oops - sorry I’d forgotten for a second we were working with Panel Schedule Instances. Element.OwnerView should work with those!

It showed null for me:(. going to work on it more tonight

Hmm, Element.OwnerView worked for me, but perhaps it is a 2.0 thing (I’m in 1.3.2)? Were you connecting it to the PanelScheduleSheetInstances? Regardless, since you are already using the Element.TryGetPropertyValues, you can also get the OwnerViewId like so:

That looks like it would work for me. My question is, I should be able to get the sheet number from the output of the bottom node by using the element.parameter node. Note that code looks nice. I have allot to learn about dynamo.

Hmm no, the sheet number is not a parameter of the panel schedule sheet instance, otherwise we would be able to see it when the properties browser when selecting the schedule on the sheet. The OwnerViewId however is a property we can get

Understandable. I was able to get a sheet name from using the elements parameter node and it was under workset parameter (post 16). However I do not know if this is a solid way of going about it. Plus I was having difficulty getting that output into a parameter for a schedule.

BTW are you saying that ownerview id has a property that we can get the sheet number from

The workset would not give us the sheet element, though, you would have to use some reg ex to split the Workset Name string to isolate the sheet number. The OwnerViewId gives us the Element ID of the sheet, which we can get the sheet element with. From the sheet element, we can get the sheet number parameter value

1 Like

That why I dont want to use the output from the workset parameter. It way too long, plus I do not even know if it is a string.

I am going to give that a try tonight and let you know how it goes. Thanks for all the help and advice.

Okay I was able to get the information that I needed. Now I am stuck trying to get it to schedule. In the below image, I want to filter out the elements so that it looks the same as the top circuited node output. Once I figure this out then it will be all done :slight_smile:. I came close to doing it but a couple of the outputs was null even thou it was a part of the comparison list.

Hmmm if you want to add this information to a schedule then you would need to set parameter values to the schedule which I don’t believe to be an option (like you can’t add parameters to a panel schedule in Revit in general) - do you wish to add this information to the elements in the schedule?

I am trying to transfer the info into a shared parameter in revit that has already been set up. Right now, I just want the top circle output to be set but the node only takes elements. That why I trying to filter the bottom circle node before sending it to the set parameter node

dknight, did you ever get this working? I am working on the same effort and having troubles… figured i’d check in!

I came close but there is an issue in which it would not match correctly the exact string. I been getting busy with work and haven’t had time to figure it out. However my company is starting a Dynamo Group and hopefully I can gain some knowledge that could help me solve the problem.

1 Like

dknight - i meant to post this last week but was kind of side tracked with a deliverable.

I got it working with the help of my BIM team. It’s not PERFECT, but it does the job. You need to create a Project Parameter for Electrical Equipment: “Panel Schedule Sheet” (or whatever, just update the dynamo script).

Then you can create a Schedule bringing in that parameter and organize/format as needed.

It’s not perfect since you have to run the script manually, but at least once the schedule is set up you’re good to go.

PanelSchedule.dyn (26.0 KB)

1 Like

Thanks, I will look at this code along with what I have already. If things work out correctly I may be able to merge both codes together and come up with something that works consistently. Did you use any of my dyn or did you start from scratch. Also was you able to solve the issue in which it would not match the string completely. Mine worked 95% of the time. The 5% was due to instances that occur in which panel names like PP-E-01-a will now show because PP-E-01 was already found. It does not realize that there is another one called PP-E-01-a because they very similar to each other.

Yeah I think I just used your beginning portion. I haven’t had any issues yet. I used the script multiple times on about 600 panels with no errors or warnings.

That said tho - I made sure every panel was properly tagged and named prior to creating the panel schedules. I think when I was testing I had a couple of panels that were copied (so 2 panel schedules with same name) - it threw an error.

You mentioned that it not perfect. Are there things that you want to improve in the code.