Skip to content

Instantly share code, notes, and snippets.

@Civil3DToolChest
Last active August 29, 2015 13:57
Show Gist options
  • Save Civil3DToolChest/9499878 to your computer and use it in GitHub Desktop.
Save Civil3DToolChest/9499878 to your computer and use it in GitHub Desktop.
Add General Label Style
public ObjectId addGeneralLabelStyel(string name)
{
ObjectId lblId = ObjectId.Null;
Document acadDoc = Application.DocumentManager.MdiActiveDocument;
CivilDocument civilDoc = CivilApplication.ActiveDocument;
using (Transaction trans = acadDoc.Database.TransactionManager.StartOpenCloseTransaction())
{
lblId = civilDoc.Styles.LabelStyles.GeneralNoteLabelStyles.Add(name);
trans.Commit();
}
return lblId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment