How to get the BoxCenter of schedule?

When i put the views and schedule on sheet, the views turn in the viewports, but the schedule don’t turn in viewport so i can not get BoxCenter for these schedule.

I use GetCenterBox for views, but with the schedule i don’t know what attribute for them. Anyone has an idea ??

Hi,

Schedule instances don’t have that property. You can however extract their bounding box and based on that get the center point. The custom nodes are from the Clockwork package(which by the way doesn’t stop to amaze me; it has everything! :smiley: )

2015-07-21_14-31-26

if you want to place a schedule on a sheet you will need some python.

basically first create a schedule. and keep the scheduleId.

then something like:

view = doc.GetElement(scheduleID)

viewmin = view.Outline.Min

viewmax = view.Outline.Max

viewlength = (viewmax.U - viewmin.U)

viewheight = (viewmax.V - viewmax.V)

viewcenter = UV((viewmax.U - viewmin.U)/2, (viewmax.V - viewmin.V)/2)

 

the result = inches in paperspace!!

 

hope that helps

  1. Thanks Dimitar Venkov and Peter Kompolschek for yours help. I use method Schedule.Point to get the center point of the schedule. But i want how to get the schedule in a sheet, not a schedule in Schedules/Quantities use python code, because just the schedule in sheet has the Point method.

  2. I want to place the duplicated view on sheet and get the location form the original viewport on original sheet, so i get the centerbox of original viewport and set them for the new viewports when i make new sheet. I use python code for it, but the new viewports always get the last centerbox of original viewport, i just want each new viewport get each centerbox or maybe my python code was wrong. I post the picture and the dynamo file below, can you help me ??

Select-view-on-sheet - duplicate - place on sheet (Finish)

1

Schedules are a separate type from viewports. You’ll have to use the ScheduleSheetInstance.Create() method.

http://revitapisearch.com/html/8402dc3c-8bdc-40f5-be54-da08bc69d0cd.htm

I resolved the schedule in a sheet, still need help the 2nd issue !!!

thanks Dimitar Venkov for help, the 2nd issue is problem with python code for viewport not for schedule, please give me advise !!

So If I understood you correctly, you want to copy one schedule from one sheet to a group of other sheets?

You could try something along the lines of this:

2015-07-22_12-04-55

 

But to be honest, it might be more straight forward to use Revit’s UI and simply copy the original and then paste with “Aligned to Selected Views”.

1 Like

thanks again Dimitar Venkov, but my purpose is duplicate the views from onesheet and duplicate and then place duplicated views on new sheet with same original location.

Everything is ok, but with step same location, u can view my python code in dynamo file, i want to set each centerbox for each viewport, my python result is set last centerbox for all viewport.

(I’m processing with viewport of viewplan, schedule not include in this case)

hien,

first you have to find the dimensions of your sheet - basically the same procedure as for viewport - and find the center point / or lower left corner / or upper right corner…

then you will have to extract the viewports centerpoint

and now you can place the viewport at a certain point on the sheet (relatively to center / corners…)

keep in mind that sheet coordinates are U / V coordinates in inches

in my snippet i was loading views from excel hence views[i][xxx]

schedule

thanks you for help, my issue was resolved