Created
March 17, 2014 18:49
-
-
Save Civil3DToolChest/9605761 to your computer and use it in GitHub Desktop.
get label style components object id collection
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 ObjectIdCollection getLabelStyleComponentIds(ObjectId labelStyleId, LabelStyleComponentType componentType) | |
{ | |
ObjectIdCollection componentIds = new ObjectIdCollection(); | |
Document acadDoc = Application.DocumentManager.MdiActiveDocument; | |
CivilDocument civilDoc = CivilApplication.ActiveDocument; | |
using (Transaction trans = acadDoc.Database.TransactionManager.StartOpenCloseTransaction()) | |
{ | |
LabelStyle lblstyle = trans.GetObject(labelStyleId, OpenMode.ForRead) as LabelStyle; | |
componentIds = lblstyle.GetComponents(componentType); | |
trans.Commit(); | |
} | |
return componentIds; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment