Add Schedule to sheet

Add Schedule to sheet

sensiblehira
Advocate Advocate
337 Views
2 Replies
Message 1 of 3

Add Schedule to sheet

sensiblehira
Advocate
Advocate

Hello, I wanted to find the command to add a schedule to a sheet. Can anyone help out.

ChatGPT is not giving the correct answer.

0 Likes
Accepted solutions (1)
338 Views
2 Replies
Replies (2)
Message 2 of 3

sensiblehira
Advocate
Advocate
Accepted solution

Found the ScheduleSheetInstance class

0 Likes
Message 3 of 3

Chuong.Ho
Advocate
Advocate

You can easy to do it by using Create from class ScheduleSheetInstance :

var document = commandData.Application.ActiveUIDocument.Document;
var viewSheetID = document.ActiveView.Id;
var scheduleId = new ElementId(123456); // Replace with your schedule ID
ScheduleSheetInstance scheduleInstance = ScheduleSheetInstance.Create(document,viewSheetID,scheduleId,new XYZ(0,0,0));

 

Chuong Ho

EESignature

0 Likes