This method is used to get the information of a Data Shortcut from current Data Shortcut project. API users can get the information: what is the name of the Data Shortcut, where is the expected source drawing and whether it is broken or not.

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

Syntax

C#
public DataShortcuts..::..DataShortcutManager..::..PublishedItem GetPublishedItemAt(
	int index
)
Visual Basic
Public Function GetPublishedItemAt ( _
	index As Integer _
) As DataShortcuts..::..DataShortcutManager..::..PublishedItem
Visual C++
public:
DataShortcuts..::..DataShortcutManager..::..PublishedItem^ GetPublishedItemAt(
	int index
)

Parameters

index
Type: System..::..Int32
Specify an index of Data Shortcut in the current Data Shortcut project.

Return Value

Returns the information of the specified Data Shortcut.

Examples

API user can call this method to check status of the specified Data Shortcut and get some information.
CopyC#
 1DataShortcuts.SetWorkingFolder(@"F:\DSWorkingFolder");
 2DataShortcuts.SetCurrentProjectFolder("ProjBroken");
 3DataShortcuts.Validate();
 4bool isValidCreation = false;
 5var shortcutMgr = DataShortcuts.CreateDataShortcutManager(ref isValidCreation);
 6int numOfItems = shortcutMgr.GetPublishedItemsCount();
 7for (int index = 0; index < numOfItems; index++)
 8{
 9    var item = shortcutMgr.GetPublishedItemAt(index);
10    if (item.IsBroken)
11    {
12        shortcutMgr.RepairBrokenDataShortcut(index, sourceDwg, true);
13    }
14 }

See Also