
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This has to be an easy fix.
am creating a new project from and existing central file. Everything works as expected except when the user goes to open the file it defaults to the AskUserToSpecify setting. I want to change the default setting to AllEditable but I can't seem to figure out how to set that option.
I believe I have to set the SimpleWorksetConfiguration but I'm not sure.
Here is the code I'm using
///***********************************
/// Open central file template and save it as
/// a new project central file
/// ************************************
Autodesk.Revit.UI.UIDocument newRvtDoc = rvtUiApp.OpenAndActivateDocument(fileToCopy);
Autodesk.Revit.DB.Document newProjCent = rvtUiApp.ActiveUIDocument.Document;
SaveAsOptions options = new SaveAsOptions();
WorksharingSaveAsOptions wsOptions = new WorksharingSaveAsOptions();
wsOptions.SaveAsCentral = true;
options.SetWorksharingOptions(wsOptions);
ModelPath modelPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(newLocation);
newProjCent.SaveAs(newLocation, options);
Solved! Go to Solution.