Autodesk.Revit.DB.Events.DocumentSaveToLocalProgressChangedEventArgs是Revit API中的一个事件参数类,用于提供将文档保存到本地的进度变化信息。
以下是DocumentSaveToLocalProgressChangedEventArgs类的构造函数:
public DocumentSaveToLocalProgressChangedEventArgs(int currentProgress, string currentStatus)
currentProgress 表示当前保存进度,取值范围为0到100。currentStatus 表示当前保存状态,以字符串形式返回。以下是DocumentSaveToLocalProgressChangedEventArgs类的属性:
CurrentProgress 获取当前保存进度,返回int类型。CurrentStatus 获取当前保存状态,返回string类型。使用DocumentSaveToLocalProgressChangedEventArgs类,可以在将文档保存到本地的过程中实时获取保存进度和状态信息。可以在Revit API事件处理器中使用该类,示例如下:
private void OnDocumentSavingToLocalProgressChanged(object sender, DocumentSaveToLocalProgressChangedEventArgs e)
{
Console.WriteLine("Saving progress: " + e.CurrentProgress + "%");
Console.WriteLine("Saving status: " + e.CurrentStatus);
}