Creates a new instance of a GridSurface and adds it to the specified database.

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

Syntax

C#
public static ObjectId Create(
	Database database,
	string surfaceName,
	double spacingX,
	double spacingY,
	double orientation
)
Visual Basic
Public Shared Function Create ( _
	database As Database, _
	surfaceName As String, _
	spacingX As Double, _
	spacingY As Double, _
	orientation As Double _
) As ObjectId
Visual C++
public:
static ObjectId Create(
	Database^ database, 
	String^ surfaceName, 
	double spacingX, 
	double spacingY, 
	double orientation
)

Parameters

database
Type: Database
The database where the new GridSurface is created.
surfaceName
Type: System..::..String
The name of the GridSurface.
spacingX
Type: System..::..Double
The x spacing of the GridSurface.
spacingY
Type: System..::..Double
The y spacing of the GridSurface.
orientation
Type: System..::..Double
The orientation of the GridSurface.

Remarks

The units for spacingX, spacingY and orientation are taken from the settings in SettingsCmdCreateSurface. The default surface style is applied to the new GridSurface object.

Exceptions

ExceptionCondition
System..::..ArgumentException Thrown when:
  1. The surfaceName is empty.
  2. The spacingX or spacingY are less than or equal to 0.0.

See Also