Adds a new CogoPoint at the given location with the specified description information, optionally using a DescriptionKey.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0

Syntax

C#
public ObjectId Add(
	Point3d location,
	string desc,
	bool useDescriptionKey,
	bool matchOnParams,
	bool useNextPointNumSetting
)
Visual Basic
Public Function Add ( _
	location As Point3d, _
	desc As String, _
	useDescriptionKey As Boolean, _
	matchOnParams As Boolean, _
	useNextPointNumSetting As Boolean _
) As ObjectId
Visual C++
public:
ObjectId Add(
	Point3d location, 
	String^ desc, 
	bool useDescriptionKey, 
	bool matchOnParams, 
	bool useNextPointNumSetting
)

Parameters

location
Type: Point3d
The location of the new CogoPoint.
desc
Type: System..::..String
The description of the new CogoPoint.
useDescriptionKey
Type: System..::..Boolean
Specifies whether to use the DescriptionKey.
matchOnParams
Type: System..::..Boolean
Specifies whether parameters are used in description key matching to rotate and scale the point symbol.
useNextPointNumSetting
Type: System..::..Boolean

Return Value

The ObjectId of the newly-added CogoPoint.

Remarks

If useDescriptionKey is set to false, the behavior of this method is equal to Add(location, desc).

Examples

CopyC#
 1// _civildoc is the active CivilDocument instance.
 2CogoPointCollection cogoPoints = _civildoc.CogoPoints;
 3Point3d location = new Point3d(100.0, 150.0, 50.0);
 4bool useDescriptionKey = true;
 5bool matchOnParameters = true;
 6// Parameters in the description key are matched and used.
 7cogoPoints.Add(location, "Sample COGO Point", useDescriptionKey, matchOnParameters);
 8
 9// Parameters in the description key are not matched.
10location = new Point3d(120.0, 125.0, 55.0);
11matchOnParameters = false;
12cogoPoints.Add(location, "Another Sample COGO Point", useDescriptionKey, matchOnParameters);
CopyVB.NET
 1' _civildoc is the active CivilDocument instance.
 2Dim cogoPoints As CogoPointCollection = _civildoc.CogoPoints
 3Dim location As New Point3d(100.0, 150.0, 50.0)
 4Dim useDescriptionKey As Boolean = True
 5Dim matchOnParameters As Boolean = True
 6' Parameters in the description key are matched and used.
 7cogoPoints.Add(location, "Sample COGO Point", useDescriptionKey, matchOnParameters)
 8
 9' Parameters in the description key are not matched.
10location = New Point3d(120.0, 125.0, 55.0)
11matchOnParameters = False
12cogoPoints.Add(location, "Another Sample COGO Point", useDescriptionKey, matchOnParameters)

See Also