Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
Part of one of my Addins will create and place schedules on a sheet. The sheets have layout options that the user can choose, so I need to be able to get a handle on the existing schedule and move it around the sheet. Problem is when I iterate through the Views collection on the sheet the Schedule is not present. I have also tried ViewSheet.GetAllViewports() but again schedules are not present in the returned set. Does anyone know how I can get a reference to an existing Instance of a schedule on a sheet?
Actually, just before I submitted this one I thought I would think it through...
Came up with this that seems to work so thought I would share it:
var scheduleColl = from elements in new FilteredElementCollector(doc) .OfClass(typeof(ScheduleSheetInstance)) let type = elements as ScheduleSheetInstance where type.OwnerViewId == viewSheet.Id select type; foreach (ScheduleSheetInstance ssi in scheduleColl) { ssi.Point = new XYZ(2, 2, 0); }
Solved! Go to Solution.