- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I am struggling with the IsCentral, IsLocal properties
I have read thru some posts and even thought I had it working but no.
I understand there is a file path vs. server path and I believe I am going after the network file path, not a Revit Server Path.
public static bool IsLocal(Document doc)
{
BasicFileInfo basicFileInfo = BasicFileInfo.Extract(doc.PathName);
if (basicFileInfo.IsLocal)
return true;
else
return false;
}
public static bool IsCentral(Document doc)
{
BasicFileInfo basicFileInfo = BasicFileInfo.Extract(doc.PathName);
if (basicFileInfo.IsCentral)
return true;
else
return false;
}
Both return the opposite of what I expect.
If I compare doc.GetWorksharingCentralModelPath
with
doc.PathName, when in a local, they are different, in a central they are the same on home computer
but on work computer
I can't compare 'easily' one path with the other because of UNC,
doc.PathName is not UNC and doc.GetWorksharingCentralModelPath is UNC
One link I have referenced but did not work for me is this one.
What is the best way to tell if the file I just opened is a central or a local model?
thanks for ant assistance
Solved! Go to Solution.