There is a method which copies a Civil 3D style object from one drawing to another – this is StyleBase::ExportTo(). It is helpful for copying any kind of styles, such as Label styles, Surface styles or others. But when you use this method to copy a style to the same drawing, it may fail.
The reason for this is that the ExportTo() method was not designed to export styles to the same drawings.
Instead of this, we can use StyleBase::CopyAsSibling(). Here is a code snippet :
Database db = HostApplicationServices.WorkingDatabase;
using (Transaction ts = HostApplicationServices.WorkingDatabase.
TransactionManager.StartTransaction())
{
ObjectId id =
CivilApplication.ActiveDocument.Styles.AlignmentStyles[0];
AlignmentStyle alignStyle =
id.GetObject(OpenMode.ForWrite) as AlignmentStyle;
alignStyle.CopyAsSibling("newStyle_CopyAlignmentStyle");
ts.Commit();
}