Change name of schedule instance

I’d like to rename a bunch of schedules in my project.

I am able to successfully retrieve the schedule instances and then extract the current schedule name with Wombat Element.Try.GetPropertyValue using “Name” as the property name.

So far, so good. But now I’m stuck.

But I have no idea how to change this property. I presume an API call needed. Is there a node that does this?

thank you for advice.

View Name is the parameter. You can write straight to it with SetParameterByName.

This doesn’t seem to work.
The element I am working with is a ScheduleSheetInstance.
running this through element.parameters reports only five items:
category (schedule graphics)
category (schedule graphics)
design option (-1)
family name (blank)
type (blank)

I am pretty sure your suggestion works for regular views but it doesn’t work for schedule instances.

Correct. You would have to modify the schedule view, not the schedule instance. How are you collecting all your schedules? You would want to use Schedules instead of Schedule Graphics with All Elements of Category.

Edit: Oops. Accidentally cut it off in the image, but the parameter is "View Name" there.

Thank you Nick.
I did a bit of homework and now understand the difference between a ScheduleView and ScheduleSheetInstance. This was the fundamental stumbling block for me.

In my case each ScheduleView will have only one sheet instance.

The name I want to assign to the schedule view will be based on the sheet number that the related instance lives on. So what I need is a way of traversing from the ScheduleView to the ScheduleSheetInstance.

I now have the ID of ScheduleView ID and I can pull out the schedule ID from the ScheduleSheetInstance and match them up, perhaps with filter list by list. But is there a simpler way to retrieve schedule instances from schedule views?

hmm. not so easy. ScheduleID from a schedule instance comes in as AutoDesk.Revit.DB.ElementID and I do not know how to compare this to a good old element ID in Dyanamo. What fun!

I don’t know of any nodes of the top of my head that would do this so you may have to use Python. You would start with the schedule instance and get the sheet number and the schedule definition (schedule view). Then you would rename the schedule view with the sheet info.

You could also try comparing the names of both the schedule instances and the schedule views.

Thanks. The comparison between the fields seems to be a problem. I can’t convert the data type of the elementID property to anything other nodes seem to be able to handle.

The Ids won’t match anyway. They’re different elements. The name should be enough to match up the schedule view with the schedule instance.