Community
hey all hope be well,
I want to have footer for my field in schedule and based on revit api docs that here is the link " show footer sample "
I changed my code but nothing is not happed.
// Set sorting by type,
if (typeSorting != null)
{
schedule.Definition.AddSortGroupField(typeSorting);
typeSorting.ShowBlankLine = true;
typeSorting.ShowFooter = true;
}
really appreciated if correct me
Solved! Go to Solution.
Solved by Mohamed_Arshad. Go to Solution.
HI @nia98bim
You did a minor mistake, need to show footer before passing to the AddSortGroupField Method, kindly check the below code snippet.
Code Snippet
ScheduleFieldId fieldId = schedule.Definition.GetFieldId(0);
Transaction showFooter = new Transaction(doc, "Show Footer");
showFooter.Start();
ScheduleSortGroupField typeSorting = new ScheduleSortGroupField(fieldId);
typeSorting.ShowFooter= true;
typeSorting.ShowBlankLine= true;
schedule.Definition.AddSortGroupField(typeSorting);
showFooter.Commit();
Hope this will Helps 🙂
Can't find what you're looking for? Ask the community or share your knowledge.