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.7.0.1276
Syntax
C#
public static ObjectIdCollection CreateReference( Database hostDrawing, Database sourceDrawing, string entityName, DataShortcutEntityType dsEntityType )
VB
Public Shared Function CreateReference ( hostDrawing As Database, sourceDrawing As Database, entityName As String, dsEntityType As DataShortcutEntityType ) As ObjectIdCollection
C++
public: static ObjectIdCollection^ CreateReference( Database^ hostDrawing, Database^ sourceDrawing, String^ entityName, DataShortcutEntityType dsEntityType )
Parameters
- hostDrawing Database
- Host Database. The reference entity will be created in this database.
- sourceDrawing Database
- Source database point to source drawing.
- entityName String
- Source entity name.
- dsEntityType DataShortcutEntityType
- Data Shortcut entity type.
Return Value
ObjectIdCollectionThe Data Reference entity and sub-entity IDs.
Exceptions
Exception | Condition |
---|---|
System::ArgumentNullException, System::ArgumentException |
Example
This example shows how to call this method.1ObjectIdCollection^ objectIds = DataShortcuts.CreateReference(hostDrawing, sourceDrawing, entityName, DataShortcutEntityType.Alignment);