Gets the collection of ProfileHatchArea objects in the profile view. Hatch areas are
used to highlight cut and fill regions.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
Examples
CopyC#
1[CommandMethod("ProfileHatching")]
2public void ProfileHatching()
3{
4 doc = CivilApplication.ActiveDocument;
5 Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
6
7 using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
8 {
9
10 PromptEntityOptions opt = new PromptEntityOptions("\nSelect a profile view");
11 opt.SetRejectMessage("\nObject must be a profile view.\n");
12 opt.AddAllowedClass(typeof(ProfileView), false);
13 ObjectId profileViewID = ed.GetEntity(opt).ObjectId;
14 ProfileView oProfileView = ts.GetObject(profileViewID, OpenMode.ForRead) as ProfileView;
15 ed.WriteMessage("\nHatch areas defined in this profile view: \n");
16 foreach (ProfileHatchArea oProfileHatchArea in oProfileView.HatchAreas)
17 {
18 ed.WriteMessage(" Hatch area: " + oProfileHatchArea.Name + " shape style: " + oProfileHatchArea.ShapeStyleName + "\n");
19 foreach (ProfileCriteria oProfileCriteria in oProfileHatchArea.Criteria)
20 {
21 ed.WriteMessage(string.Format(" Criteria: type: {0} profile: {1}\n", oProfileCriteria.BoundaryType.ToString(), oProfileCriteria.ProfileName));
22 }
23 }
24 }
25}
See Also