Create Data Reference entity at host drawing according to host database, source database entity name of source drawing and Data Shortcut entity type.

Namespace: Autodesk.Civil.DataShortcuts
Assembly: AeccDataShortcutMgd (in AeccDataShortcutMgd.dll) Version: 13.4.2516.0

Syntax

C#
public static ObjectIdCollection CreateReference(
	Database hostDrawing,
	Database sourceDrawing,
	string entityName,
	DataShortcutEntityType dsEntityType
)
Visual Basic
Public Shared Function CreateReference ( _
	hostDrawing As Database, _
	sourceDrawing As Database, _
	entityName As String, _
	dsEntityType As DataShortcutEntityType _
) As ObjectIdCollection
Visual C++
public:
static ObjectIdCollection^ CreateReference(
	Database^ hostDrawing, 
	Database^ sourceDrawing, 
	String^ entityName, 
	DataShortcutEntityType dsEntityType
)

Parameters

hostDrawing
Type: Database
Host Database. The reference entity will be created in this database.
sourceDrawing
Type: Database
Source database point to source drawing.
entityName
Type: System..::..String
Source entity name.
dsEntityType
Type: Autodesk.Civil.DataShortcuts..::..DataShortcutEntityType
Data Shortcut entity type.

Return Value

The Data Reference entity and sub-entity IDs.

Examples

This example shows how to call this method.
CopyC#
1ObjectIdCollection^ objectIds = DataShortcuts.CreateReference(hostDrawing, sourceDrawing, entityName, DataShortcutEntityType.Alignment);

Exceptions

ExceptionCondition
System::ArgumentNullException, System::ArgumentException

See Also