public void UpdateProjectStructure()
public void UpdateProjectStructure()
This method is useful only from plugins.
Use together with the silent manipulation with documents.
// HpD API plugin invoked from Project page: Project project = api.CurrentProject ?? throw new Exception(); // Create new variant in the silent mode. Variant variant = project.CreateVariant("NewVariant", silent: true); // The new variant is not shown in the project structure for now. // Creating multiple documents at once without refreshing project structure after each document: // Set the variant to the silent mode (or open it in the silent mode). variant.SilentMode = true; // Create documents. for (int i = 0; i < 50; i++) { variant.CreateWorkspace($"Workspace{i}"); } // There is still no new document shown in project structure in UI. // Refresh the project structure only once at the end. project.UpdateProjectStructure(); // New variant and all its new documents are shown in the project structure now.