Dear experts,The SDK provides limited information about Revit Server,i want to calling the base interface method like:download...,can you provide an example?
Solved! Go to Solution.
Solved by jeremy_tammik. Go to Solution.
Solved by jeremy_tammik. Go to Solution.
Solved by H.echeva. Go to Solution.
Maybe some of these can help:
Hi,Jeremy!
thanks for your solution,Your answer helped me a lot,after reading these articles,I still have a question:after get the RevitServer filepath ,how do I open the file by RevitAPI?
Hello,
I created several add-ins to manage Revit Server files. One of them is to batch export Navisworks files from the Revit Server and the other one for exporting Revit files.
I didn't use the Revit Server API. You can use normal Revit and Windows methods to manage the paths and open the files.
You can access the Revit Server project through Windows File Explorer. If you don't know the path ask your IT department. You will probably need permission to access these folders.
In the image below you can see how it looks like (blurred bits for confidentiality).
Note that each Revit file is represented by a folder, which ends in ".rvt"!! (not actual rvt files). However, if you get the path of these folders, you can use it to open the models.
I hope this helps.
Hello,Jeremy, I read all the blog of revit server that you write,I have a general understanding of how Revit Server works,As H.echeva said,I can get the revit server file(*.rvt) through Windows File Explorer. For example,there have a revit server "172.18.1.32" and save a entral file at "testfolder\1.rvt",Now I can open the file by two ways,first:doc.OpenFile(@"RSN://172.18.1.32/testfolder/1.rvt"),the second ,use the method Application.CopyModel(),copy the file as a local file ,then open the local file 。After modify the file , I want to Synchronize with the central file,the two way about open file will be get different result?
Congratulations on successfully accessing the server files in the two ways you describe.
Unfortunately, I cannot test the scenarios you describe.
Can you try it out and let us know how it works for you?
Thank you!
Hello,Jeremy!
Yesterday , input the file path in revit open file dialog like "RSN://172.18.1.32/8364dfab-968d-4a9c-8b6b-f75d0c1b5330/04_二次沉淀池_结构.rvt",the file was opened successfully, then I try to open the file by commandData.Application.Application.OpenDocumentFile(@"RSN://172.18.1.32/8364dfab-968d-4a9c-8b6b-f75d0c1b5330/04_二次沉淀池_结构.rvt"),however,it failed,revit return the error message "the filepath to be opened doesn't exist",the method Application.CopyModel(),return the same message.
Now ,I'm very confused,can you provide a example about open revit server file?
hello,H.echeva:
I copy the folder from revit server to local,but I don't know how to open the .rvt project though the folder and sub file.
Hello,
In Revit you need to open the folder that I point in your image. You need to pass Revit the path to that folder, not to what is inside!
So fo example, if you have a path that is Autodesk/Revit Server 2021/Projects/FOLDER.rvt
Just pass that path to the Revit API. I know it is weird because it is a folder and not a Revit file!!
But this is how it works.
EDIT: Sorry I forgot to mention, that you will need to transform the path to a Revit Server Path!
So if my path is:
\\revit-london\Autodesk$\Revit Server 2021\Projects\2054 SingleHouseProject\Model1.rvt
I need to transform it to:
RSN://REVIT-LONDON.zzz.s/Autodesk$/Revit Server 2021/Projects/2054 SingleHouseProject/Model1.rvt
Note that I also changed this / to this \
Dear Jeremy:
I'm sorry to bother you,Now I can operate RS well through the Revit API and RS API,but I found a new problem after open centrial file ,when I open file by Revit ,there have two options that I can choose:DetachFromCentral or create local file , the file that I opened through create local file,the Revit button "Reload WorkSet" is enable,but when I open the file by Revit API"Autodesk.Revit.UI.UIApplication. OpenAndActivateDocument()" ,No matter how I set value of "OpenOptions.DetachFromCentralOption ",after file open,the button "Reload WorkSet" is not enable.Can you give me some advice?
Sorry, I do not completely understand. Can you provide a minimal reproducible case?
https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b
Hello,jerymy!
I apologize for not being able to describe my problem clearly,I opened a central file on Revit Server through the Revit API,The code snippet is below:
However,this button is not available.
I tried to open this file by selecting this option,the button is available
I tried all four values of DetachFromCentralOption, and none of them worked。