Share

GridSurface.Create(Database, String, Double, Double, Double) Method

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



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

Syntax

C#

public static ObjectId Create(
	Database database,
	string surfaceName,
	double spacingX,
	double spacingY,
	double orientation
)

VB

Public Shared Function Create ( 
	database As Database,
	surfaceName As String,
	spacingX As Double,
	spacingY As Double,
	orientation As Double
) As ObjectId

C++

public:
static ObjectId Create(
	Database^ database, 
	String^ surfaceName, 
	double spacingX, 
	double spacingY, 
	double orientation
)

Parameters

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

Return Value

ObjectId

Exceptions

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

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.

See Also

Reference

Was this information helpful?