File-based central model path

File-based central model path

Anonymous
Not applicable
2,277 Views
1 Reply
Message 1 of 2

File-based central model path

Anonymous
Not applicable

How can I get "file-based" worksharing central model path from a local model? I also read Typepad Post that says Document.GetWorksharingCentralModelPath() is for when using Revit Server (so for my case it just returns a empty string), but couldn't figure out what to do with "file-based" central models.

 

I work with Inventory mainly and not too good with Revit, but I appreciate it if someone could point me in the right direction.

0 Likes
2,278 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Try using the ModelPathUtils after getting the Worksharing model path. Something like this should work:

 

        private string GetCentralServerPath(Document doc)
        {
            var modelPath = doc.GetWorksharingCentralModelPath();
            var centralServerPath = ModelPathUtils.ConvertModelPathToUserVisiblePath(modelPath);

            return centralServerPath;
        }