In AutoCAD Civil 3D, User Interface (UI) , we can select a Profile LabelGroup in the Profile View and from the "Edit Label Group" tool / command we can bring-up the "Profile Label" dialog box. In that dialog box, each Type of Profile Label Groups are listed and using the UI tools we can Add or Remove (X) a particular Type.
If you want to programmatically remove / erase a particular Profile Label Group, the first task is to identify the Profile Label Group Type. In the following example, we can see ProfileCrestCurveLabelGroup Type which is listed as AECC_VALIGNMENT_CRESTCURVE_LABEL_GROUP when we use the LIST command is selected first and later removed just by calling the Erase() method.
// select a Label Object
PromptEntityOptions peo = new PromptEntityOptions("Select A Profile Label Group : ");
peo.SetRejectMessage("\nOnly Label is allowed");
peo.AddAllowedClass(typeof(Autodesk.Civil.DatabaseServices.ProfileCrestCurveLabelGroup), false);
PromptEntityResult per = ed.GetEntity(peo);
if (per.Status != PromptStatus.OK) return;
//start a transaction
using (Transaction trans = db.TransactionManager.StartTransaction())
{
ProfileCrestCurveLabelGroup profCrestCurveLabelGroup = trans.GetObject(per.ObjectId, OpenMode.ForWrite) as ProfileCrestCurveLabelGroup;
profCrestCurveLabelGroup.Erase();
trans.Commit();
}
Hope this is useful to you!