How enable calculate totals for columns in schedules

How enable calculate totals for columns in schedules

ptcymas7
Explorer Explorer
351 Views
2 Replies
Message 1 of 3

How enable calculate totals for columns in schedules

ptcymas7
Explorer
Explorer

With what methods, approach, I can get that behaviour in Revit 2022? Currently I can get the next schedule using the api:

 

ptcymas7_0-1719249767211.png

I wanted have the totals of the area, for example, [603m2, 19m2, 622m2]. In the same way that the counts.
In Revit it's enabling the format option "calculate totals" in the desired parameter, but how with the api?
I only found the method: 

But this method only checks if the parameters can show the totals that I wanted, not enable the calculation

Thanks 🙂

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

Speed_CAD
Collaborator
Collaborator
Accepted solution

Hi ptcymas7,

 

If you mean what is shown in the attached image (red box), then you must use the DisplayType option of the ScheduleField. For example:

 

 

ScheduleField scheduleField = viewSchedule.Definition.GetField(0);
scheduleField.DisplayType = ScheduleFieldDisplayType.Totals;

 

 

Speed_CAD_1-1719271575260.png

 

Mauricio Jorquera
Message 3 of 3

ptcymas7
Explorer
Explorer
Man, that's just what I wanted. Thanks, I love u ❤️
0 Likes