Last active
August 29, 2015 13:57
-
-
Save Civil3DToolChest/9499878 to your computer and use it in GitHub Desktop.
Add General Label Style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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