Schedule: Framing Type

Schedule: Framing Type

Anonymous
Not applicable
730 Views
2 Replies
Message 1 of 3

Schedule: Framing Type

Anonymous
Not applicable

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,

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

Anonymous
Not applicable
Accepted solution

Nevermind.

 

ScheduleFieldType.Instance

BuiltInParameter.ELEM_TYPE_PARAM

 

I swear I tried that...

Message 3 of 3

Anonymous
Not applicable

Any chance you could explain how you pulled the

p_widthId

?

 

I'm assuming these are the parameter ids, and I have been struggling with pulling shared parameter ids for quite some time now.

 

Thanks,

From a novice coder.

0 Likes