11/29/2023 0 Comments Run freefilesync with psexec* opt.DetachFromCentralOption = DetachFromCentralOption.DetachAndDiscardWorksets */ ModelPath mp = ModelPathUtils.ConvertUserVisiblePathToModelPath(filePath.FullName) Mpath = folderBrowserDialog1.SelectedPath */įoreach (String projectPath in theDialogRevit.FileNames)įileInfo filePath = new FileInfo(projectPath) If (folderBrowserDialog1.ShowDialog() = DialogResult.OK) If (theDialogRevit.ShowDialog() = DialogResult.OK)įolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog() įolderBrowserDialog1.Description = "Select Folder Where Revit Projects to be Saved in Local" įolderBrowserDialog1.RootFolder = 圜omputer TheDialogRevit.Filter = "RVT files|*.rvt" TheDialogRevit.Title = "Select Revit Project Files" OpenFileDialog theDialogRevit = new OpenFileDialog() This.Shutdown += new System.EventHandler(Module_Shutdown) This.Startup += new System.EventHandler(Module_Startup) Private void Module_Shutdown(object sender, EventArgs e) Private void Module_Startup(object sender, EventArgs e) * To change this template use Tools | Options | Coding | Edit Standard Headers. ![]() Copy and paste it into a new Application Macro in Revit. The key part of the code is here:įirst, get the code below. After you select them, it then loops over each file and Opens it, then does a Relinquish All Mine on User Created Worksets, and then it Syncs with Central and Closes the file. This Application level macro starts with a dialog box where you can select files. As I didn’t want to do this manually, I sourced some macro code from here and adapted it for my situation. ![]() All that was needed was a simple Open and Relinquish. They were upgraded and they were Central files. (Note: you can Detach and recreate the file but that is dangerous if you have multiple people working on something)īasically I had a bunch of Revit files that had all User Worksets from certain usernames checked out. If someone has a User Workset checked out, you won’t be able to edit it until they Relinquish.Workshared Revit files use a persons Revit user name (sometimes linked to an Autodesk SSO login) to determine if things are checked out.If you have gone through a process of saving Central models, and you have forgotten to ‘Synchronize with Central’ before closing them for the first time, you may find that your user has all User Created Worksets checked out in those files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |