2021 Method
Changes 0
M

Document.ReloadLatest

Description:
Fetches changes from central (due to one or more synchronizations with central) and merges them into the current session.
Remarks:
After this call finishes, use hasAllChangesFromCentral to confirm that there were no Synchronizations with Central performed during execution of ReloadLatest.
public void ReloadLatest(
	ReloadLatestOptions reloadOptions
)
public static void ReloadLatestWithMessage(Document doc)
{
    // Tell user what we're doing
    TaskDialog td = new TaskDialog("Alert");
    td.MainInstruction = "Application 'Automatic element creator' needs to reload changes from central in order to proceed.";
    td.MainContent = "This will update your local with all changes currently in the central model.  This operation " +
                     "may take some time depending on the number of changes available on the central.";
    td.CommonButtons = TaskDialogCommonButtons.Ok | TaskDialogCommonButtons.Cancel;

    TaskDialogResult result = td.Show();

    if (result == TaskDialogResult.Ok)
    {
        // There are no currently customizable user options for ReloadLatest.
        doc.ReloadLatest(new ReloadLatestOptions());
        TaskDialog.Show("Proceeding...", "Reload operation completed, proceeding with updates.");
    }
    else
    {
        TaskDialog.Show("Canceled.", "Reload operation canceled, so changes will not be made.  Return to this command later when ready to reload.");
    }
}