Message 1 of 3

Not applicable
02-18-2013
11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
OK, I searched all over this board for this issue and could find nothing. If it's addressed elsewhere please link the thread.
I'm trying to create a custom framing schedule where the first column shows the "Type" of the framing element. The remaining fields are derived from shared parameters that I'm calling by ElementId. It works when I comment out the AddField() method for the Type. I get a schedule containing all the instances of the remaining parameters. Could someone point out my error in calling the framing element types?
ViewSchedule rebarSched = ViewSchedule.CreateSchedule(doc, new ElementId (BuiltInCategory.OST_StructuralFraming)); rebarSched.ViewName = "XXX"; ScheduleDefinition sd = rebarSched.Definition; SchedulableField width = new SchedulableField(ScheduleFieldType.Instance, p_widthId); SchedulableField depth = new SchedulableField(ScheduleFieldType.Instance, p_depthId); SchedulableField topBars = new SchedulableField(ScheduleFieldType.Instance, p_topBarsId); SchedulableField bottomBars = new SchedulableField(ScheduleFieldType.Instance, p_bottomBarsId); SchedulableField tieSpacing = new SchedulableField(ScheduleFieldType.Instance, p_tieSpacingId);
ScheduleField Mark = sd.AddField(ScheduleFieldType.ElementType, new ElementId(BuiltInParameter.ALL_MODEL_TYPE_NAME));
ScheduleField Width = sd.AddField(width); ScheduleField Depth = sd.AddField(depth); ScheduleField TopBars = sd.AddField(topBars); ScheduleField BottomBars = sd.AddField(bottomBars); ScheduleField TieSpacing = sd.AddField(tieSpacing);
Thanks,
Solved! Go to Solution.