After a fair amount of trial and error and a great deal of searching I was able to put together the following.
At the moment the two methods only apply to the hard coded style of "Test", but I feel confident I can rework it to allow it to function based on a selection. You will note that several lines are commented as not being necessary, I have left them in place for now as I feel I may be able to use them as a basis for defining the styleID variable based on user selection. But based on my current understanding they are not actually passing any data to the database.
One thing I have not been able to determine would be how to specify the elevation that figure styles are flattened to. I have located the following reference, but I am unsure of how to implement the get set functionality.
https://help.autodesk.com/view/CIV3D/2022/ENU/?guid=f321bd87-e521-1e82-6471-326b9ed5a896
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using Autodesk.Civil.ApplicationServices;
using Autodesk.Civil.DatabaseServices.Styles;
using Autodesk.Civil.DatabaseServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.AutoCAD.ApplicationServices;
namespace CDF.SFStyles
{
public class Commands
{
[CommandMethod("SF2D")]
public void SurveyFigure2D()
{
var doc = Application.DocumentManager.CurrentDocument;
var db = doc.Database;
var ed = doc.Editor;
var civdoc = CivilApplication.ActiveDocument;
var styleId = civdoc.Styles.SurveyFigureStyles["Test"];
var entOpts = new PromptEntityOptions("\nSelect SurveyFigure");//These lines are not actually necessary.
entOpts.SetRejectMessage("...not a survey figure, try again!");//These lines are not actually necessary.
entOpts.AddAllowedClass(typeof(SurveyFigure), true); //These lines are not actually necessary.
var sel = ed.GetEntity(entOpts); //These lines are not actually necessary.
if (sel.Status != PromptStatus.OK) //These lines are not actually necessary.
return; //These lines are not actually necessary.
using (Transaction tr = db.TransactionManager.StartTransaction())
{
var style = (SurveyFigureStyle)tr.GetObject(styleId, OpenMode.ForWrite);
style.NetworkDisplayMode = SurveyElevationDisplayType.FlattenElevation;
tr.Commit();
}
}
[CommandMethod("SF3D")]
public void SurveyFigure3D()
{
var doc = Application.DocumentManager.CurrentDocument;
var db = doc.Database;
var ed = doc.Editor;
var civdoc = CivilApplication.ActiveDocument;
var styleId = civdoc.Styles.SurveyFigureStyles["Test"];
var entOpts = new PromptEntityOptions("\nSelect SurveyFigure");//These lines are not actually necessary.
entOpts.SetRejectMessage("...not a survey figure, try again!");//These lines are not actually necessary.
entOpts.AddAllowedClass(typeof(SurveyFigure), true); //These lines are not actually necessary.
var sel = ed.GetEntity(entOpts); //These lines are not actually necessary.
if (sel.Status != PromptStatus.OK) //These lines are not actually necessary.
return; //These lines are not actually necessary.
using (Transaction tr = db.TransactionManager.StartTransaction())
{
var style = (SurveyFigureStyle)tr.GetObject(styleId, OpenMode.ForWrite);
style.NetworkDisplayMode = SurveyElevationDisplayType.UseElevation;
tr.Commit();
}
}
}
}
This post provided me with the breakthrough for assigning the Elevation display type.
https://forums.autodesk.com/t5/civil-3d-customization/create-survey-figure-style-c/td-p/4882108
Thank you everyone for your assistance.