Below is an example how you can change the API to 'ExportTo' using C++.
For more information on the ExportTo Method, see ExportTo Method.
public void StyleExportTest() { try { var dwgPathAndName = @"C:\STYLES_2021.dwg"; if (!System.IO.File.Exists(dwgPathAndName)) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("No source file.\n"); } var dbFrom = new Database(false, true); dbFrom.ReadDwgFile(dwgPathAndName, FileOpenMode.OpenForReadAndAllShare, false, null); var civDocFrom = CivilDocument.GetCivilDocument(dbFrom); var dbTo = HostApplicationServices.WorkingDatabase; using (var tr = dbTo.TransactionManager.StartOpenCloseTransaction()) { try { var lineStyles = civDocFrom.Styles.LabelStyles.GeneralLineLabelStyles; var curveStyles = civDocFrom.Styles.LabelStyles.GeneralCurveLabelStyles; ObjectIdCollection idsExport = new ObjectIdCollection(); ; foreach (ObjectId id in lineStyles) idsExport.Add(id); foreach (ObjectId id in curveStyles) idsExport.Add(id); Autodesk.Civil.DatabaseServices.Styles.StyleBase.ExportTo(idsExport, dbTo, Autodesk.Civil.StyleConflictResolverType.Override); tr.Commit(); } catch (System.Exception ex) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(ex.Message + "Export failed.\n"); } } } catch (System.Exception ex) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(ex.Message + "Export failed.\n"); } }