So fall is starting in New York City and the leaves are starting to get orange, the sweater weather is approaching and the sunsets keep being marvelous. Since it is Friday and close to the time for the weekend to start we will keep this post short. But before I show you some Revit API tips let me share you a picture I took with my drone and GoPro of a breath taking sunset of the NYC Skyline.
Back to Revit, this time the question came from one of our ADN members.
Question:I have programmatically created a schedule, added department, count, area and grouped by department. When itemizing the group, it shows each room and its area, but when I turn the itemization off, the summed areas is blank (the count works correctly). If I manually (using the Revit interface) go into the schedule, in the format menu, I can choose area and check the box that says ‘Calculate totals’, which then gives me the correct sum of the areas of the department like I want to.
My question is: How can we modify the field format via API to choose Calculate totals = true on a field?
Answer: Using ScheduleField.HasTotals Property will be the best thing to do here. This property indicates if the field displays totals. And it will give you True if the field displays totals, False otherwise.
ADN Member Response: Thank you!!! That did the trick!
Nothing like successfully helping another fellow API developer.
Thank you for reading, until next time.
PS. I loved the Apple presentation, looking forward to check the Apple Watch once it comes out.