Gets or sets the AttributeTypeInfo description.
Gets or sets the AttributeTypeInfo description.
Gets or sets the AttributeTypeInfo description.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public string Description { get; set; } |
Visual Basic |
---|
Public Property Description As String Get Set |
Visual C++ |
---|
public: property String^ Description { String^ get (); void set (String^ value); } |
Examples

1// Check if classification already exists. If not, create it. 2// 3const string sampleClassificationName = "SampleClassification"; 4UDPClassification sampleClassification = null; 5if (_civildoc.PointUDPClassifications.Contains(sampleClassificationName)) 6{ 7 sampleClassification = _civildoc.PointUDPClassifications[sampleClassificationName]; 8 // sampleClassification = _civildoc.PointUDPClassifications["Inexistent"]; // Throws exception. 9} 10else 11{ 12 sampleClassification = _civildoc.PointUDPClassifications.Add(sampleClassificationName); 13 // sampleClassification = _civildoc.PointUDPClassifications.Add("Existent"); // Throws exception. 14} 15 16// Create new UDP. 17// 18AttributeTypeInfoInt typeInfoInt = new AttributeTypeInfoInt("Sample_Int_UDP"); 19typeInfoInt.Description = "Sample integer User Defined Property"; 20typeInfoInt.DefaultValue = 15; 21typeInfoInt.LowerBoundValue = 0; 22typeInfoInt.UpperBoundValue = 100; 23typeInfoInt.LowerBoundInclusive = true; 24typeInfoInt.UpperBoundInclusive = false; 25UDPInteger integerUDP = sampleClassification.CreateUDP(typeInfoInt); 26 27using (Transaction tr = startTransaction()) 28{ 29 // Assign classification to Point Group. In this case, we use 30 // the "_AllPoints" point group so we can use it with all points. 31 // 32 ObjectId allPointsId = _civildoc.PointGroups.AllPointsPointGroupId; 33 PointGroup allPoints = allPointsId.GetObject(OpenMode.ForRead) as PointGroup; 34 allPoints.UseCustomClassification(sampleClassificationName); 35 36 ObjectId pointId = _civildoc.CogoPoints.GetPointByPointNumber(1); 37 CogoPoint point = pointId.GetObject(OpenMode.ForWrite) as CogoPoint; 38 int val = point.GetUDPValue(integerUDP); 39 // val should be default (15) 40 write(String.Format("Point {0} Sample_Int_UDP={1}", point.PointNumber, val)); 41 42 point.SetUDPValue(integerUDP, 0); // Works! Lower bound included. 43 // point.SetUDPValue(integerUDP, 100); // Throws! Upper bout not included. 44 45 tr.Commit(); 46}

1!ERROR: See log file!
Examples

1// Check if classification already exists. If not, create it. 2// 3const string sampleClassificationName = "SampleClassification"; 4UDPClassification sampleClassification = null; 5if (_civildoc.PointUDPClassifications.Contains(sampleClassificationName)) 6{ 7 sampleClassification = _civildoc.PointUDPClassifications[sampleClassificationName]; 8 // sampleClassification = _civildoc.PointUDPClassifications["Inexistent"]; // Throws exception. 9} 10else 11{ 12 sampleClassification = _civildoc.PointUDPClassifications.Add(sampleClassificationName); 13 // sampleClassification = _civildoc.PointUDPClassifications.Add("Existent"); // Throws exception. 14} 15 16// Create new UDP. 17// 18AttributeTypeInfoInt typeInfoInt = new AttributeTypeInfoInt("Sample_Int_UDP"); 19typeInfoInt.Description = "Sample integer User Defined Property"; 20typeInfoInt.DefaultValue = 15; 21typeInfoInt.LowerBoundValue = 0; 22typeInfoInt.UpperBoundValue = 100; 23typeInfoInt.LowerBoundInclusive = true; 24typeInfoInt.UpperBoundInclusive = false; 25UDPInteger integerUDP = sampleClassification.CreateUDP(typeInfoInt); 26 27using (Transaction tr = startTransaction()) 28{ 29 // Assign classification to Point Group. In this case, we use 30 // the "_AllPoints" point group so we can use it with all points. 31 // 32 ObjectId allPointsId = _civildoc.PointGroups.AllPointsPointGroupId; 33 PointGroup allPoints = allPointsId.GetObject(OpenMode.ForRead) as PointGroup; 34 allPoints.UseCustomClassification(sampleClassificationName); 35 36 ObjectId pointId = _civildoc.CogoPoints.GetPointByPointNumber(1); 37 CogoPoint point = pointId.GetObject(OpenMode.ForWrite) as CogoPoint; 38 int val = point.GetUDPValue(integerUDP); 39 // val should be default (15) 40 write(String.Format("Point {0} Sample_Int_UDP={1}", point.PointNumber, val)); 41 42 point.SetUDPValue(integerUDP, 0); // Works! Lower bound included. 43 // point.SetUDPValue(integerUDP, 100); // Throws! Upper bout not included. 44 45 tr.Commit(); 46}

1!ERROR: See log file!
Examples

1// Check if classification already exists. If not, create it. 2// 3const string sampleClassificationName = "SampleClassification"; 4UDPClassification sampleClassification = null; 5if (_civildoc.PointUDPClassifications.Contains(sampleClassificationName)) 6{ 7 sampleClassification = _civildoc.PointUDPClassifications[sampleClassificationName]; 8 // sampleClassification = _civildoc.PointUDPClassifications["Inexistent"]; // Throws exception. 9} 10else 11{ 12 sampleClassification = _civildoc.PointUDPClassifications.Add(sampleClassificationName); 13 // sampleClassification = _civildoc.PointUDPClassifications.Add("Existent"); // Throws exception. 14} 15 16// Create new UDP. 17// 18AttributeTypeInfoInt typeInfoInt = new AttributeTypeInfoInt("Sample_Int_UDP"); 19typeInfoInt.Description = "Sample integer User Defined Property"; 20typeInfoInt.DefaultValue = 15; 21typeInfoInt.LowerBoundValue = 0; 22typeInfoInt.UpperBoundValue = 100; 23typeInfoInt.LowerBoundInclusive = true; 24typeInfoInt.UpperBoundInclusive = false; 25UDPInteger integerUDP = sampleClassification.CreateUDP(typeInfoInt); 26 27using (Transaction tr = startTransaction()) 28{ 29 // Assign classification to Point Group. In this case, we use 30 // the "_AllPoints" point group so we can use it with all points. 31 // 32 ObjectId allPointsId = _civildoc.PointGroups.AllPointsPointGroupId; 33 PointGroup allPoints = allPointsId.GetObject(OpenMode.ForRead) as PointGroup; 34 allPoints.UseCustomClassification(sampleClassificationName); 35 36 ObjectId pointId = _civildoc.CogoPoints.GetPointByPointNumber(1); 37 CogoPoint point = pointId.GetObject(OpenMode.ForWrite) as CogoPoint; 38 int val = point.GetUDPValue(integerUDP); 39 // val should be default (15) 40 write(String.Format("Point {0} Sample_Int_UDP={1}", point.PointNumber, val)); 41 42 point.SetUDPValue(integerUDP, 0); // Works! Lower bound included. 43 // point.SetUDPValue(integerUDP, 100); // Throws! Upper bout not included. 44 45 tr.Commit(); 46}

1!ERROR: See log file!