When working with SampleLines, there are three styles you need to work with to control how sample lines are displayed:
ObjectId groupPlotStyleId = _civildoc.Styles.GroupPlotStyles.Add("New GroupPlot Style"); GroupPlotStyle groupPlotStyle = ts.GetObject(groupPlotStyleId, OpenMode.ForWrite) as GroupPlotStyle; groupPlotStyle.GetDisplayPlan(GroupPlotDisplayStyleType.Border).Color = Color.FromRgb(23, 54, 232);
ObjectId sampleLineStyleId = _civildoc.Styles.SampleLineStyles.Add("New SampleLine Style"); SampleLineStyle sampleLineStyle = ts.GetObject(sampleLineStyleId, OpenMode.ForWrite) as SampleLineStyle; // Display lines in violet sampleLineStyle.GetDisplayStylePlan(SampleLineDisplayStyleType.Lines).Color = Color.FromColorIndex(ColorMethod.ByAci, 200); sampleLineStyle.GetDisplayStyleModel(SampleLineDisplayStyleType.Lines).Color = Color.FromColorIndex(ColorMethod.ByAci, 200);
this style controls how surface cross sections are displayed in the section view graphs. The collection of all SectionStyle objects is held in the CivilDocumet.Styles.SectionStyles collection. A SectionStyle contains settings for plan view only, accessed via the GetDisplayStyleSection() method.
ObjectId sectionStyleId = _civildoc.Styles.SectionStyles.Add("New Section Style"); SectionStyle sectionStyle = ts.GetObject(sectionStyleId, OpenMode.ForWrite) as SectionStyle; sectionStyle.GetDisplayStyleSection(SectionDisplayStyleSectionType.Segments).Color = Color.FromRgb(180,0,255);