Today, let's address a resurfacing question in the Forge Design Automation for Revit or DA4R context and an interesting security aspect that probably applies to all PC users, more or less:
As is well known and clearly documented, Forge Design Automation for Revit or DA4R currently does not enable any Internet access whatsoever to the running workitem.
This obviously also prevents the ability to store an RVT BIM straight to BIM360 or C4R, Collaboration for Revit, or anywhere else in the cloud.
We discussed it again in the following ticket:
Question: I am trying DA4R (Design Automation v3 for Revit) and would like to save a Revit file as the C4R model on BIM 360 docs.
But my DA addin raises an Exception when executing doc.SaveAsCloudModel()
.
LogTrace($"params.AccountGuid: {params.AccountGuid}"); LogTrace($"params.ProjectGuid: {params.ProjectGuid}"); LogTrace($"params.FolderId: {params.FolderId}"); LogTrace($"params.FileName: {params.FileName}"); Guid accountId = new Guid(params.AccountGuid); Guid projectId = new Guid(params.ProjectGuid); // Save as a RVT file as the C4R model on BIM360 docs doc.SaveAsCloudModel( accountId, projectId, params.FolderId, params.FileName );
Would you tell me how to make this operation work properly?
Answer: Thank you for your query.
You are creating and passing in new, arbitrary GUIDs for the BIM 360 account id and project id as the first two arguments to the SaveAsCloudModel method.
This will not work. The GUIDs are pre-defined by the system.
They can be obtained as described in how to save a local file to a non-workshared cloud model.
Here are some further, related discussions that I have been collecting and that may also be of interest:
IOpenFromCloudCallback
and the DefaultOpenFromCloudCallback
class – using the Revit 2019 API to detach a model from BIM360The last one pretty exactly matches the question you have as well.
Response: In my DA add-in, SaveAsCloudCloudModel
was called with the following parameters:
doc.SaveAsCloudModel( new Guid("xxxxxxxx-xxxx-xxxx-xxxx-x...x"), // BIM360 docs AccountGUID new Guid("xxxxxxxx-xxxx-xxxx-xxxx-x...x"), // BIM360 docs ProjectGUID "urn:adsk.wipprod:fs.folder:XXXXX...XXX%22, // BIM360 docs FolderID "test-floor-model.rvt" // FileName to save );
These GUIDs and IDs were determined as described in how to save a local file to a non-workshared cloud model.
However, the result was the same (log of DA WorkItem):
[10/08/2020 23:20:40] Autodesk.Revit.Exceptions.InvalidOperationException: Could not obtain entitlement server. [10/08/2020 23:20:40] at Autodesk.Revit.DB.Document.SaveAsCloudModel(Guid accountId, Guid projectId, String folderId, String modelName) [10/08/2020 23:20:40] at IfcToRvt.Commands.ImportIFC(Document doc) [10/08/2020 23:20:40] at IfcToRvt.Commands.DesignAutomationBridge_DesignAutomationReadyEvent(Object sender, DesignAutomationReadyEventArgs e) [10/08/2020 23:20:40] at DesignAutomationFramework.DesignAutomationBridge.RaiseDesignAutomationReadyEvent(DesignAutomationReadyEventArgs e) [10/08/2020 23:20:40] at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
Is there a mistake or misunderstanding in my code above?
Worksharing model support by Revit Design Automation clearly states that DA can open a Worksharing model from C4R on BIM 360 docs.
Is it possible for DA to save a RVT file as the C4R model on BIM360 docs?
Answer: No, unfortunately that is currently not possible, as explained in how to save Revit file in BIM 360 as cloud model using Forge Design Automation API:
It is a current limitation of Design Automation that model saves can only be done into the current working directory of the cloud machine. This is because user apps are forbidden from accessing the network.
As such,
doc.SaveAsCloudModel
is not currently supported on Design Automation. That said, we have noted your request for BIM 360 functionality in Design Automation!
I checked with my colleagues whether this is still the case.
They answered: There is no alternative to save to RCW. Open/Save operations on RCW are on the priority (no ETA).
Thank you for clarifying! Some further Q & A on this:
[Q] What exactly does RCW stand for, please? Is that equivalent to BIM360? If not, what is the exact relationship between RCW, BIM360 and Forge, please?
[A] Revit Cloud Worksharing (RCW) consists of the cloud service which sends and receives streams of element data from the cloud to your local model. BIM360 is the Cloud service which hosts the streams of element data and enables RCW workflow. BTW, it is suggested to use Revit Cloud Models rather than RCW.
[Q] Thank you for clarifying RCW.
Thank you also for surprising me with a new acronym, RCM.
You say that RCM is recommended over RCW.
What is RCM? Is that part of Forge, or BIM360, or yet something else?
How can we save to, or use, in general, RCM instead of RCW?
Can SaveAsCloudModel
save to both RCM and RCW?
How can that be controlled?
This sounds to me as if a whitepaper on the whole topic and all these acronyms would be more useful than answers to individual random question.
Does such a whitepaper exist, or some source of information, or overview?
[A] Let me give it a shot, I believe this is an accurate overview:
Of these three, Design Automation for Revit can only access or save models on BIM 360.
Design Automation for Revit does not have access to and cannot sync, save, or open Revit cloud worksharing models, including Cloud Models for Revit. These are considered the "live" versions of the model customers are actively working in.
When a customer publishes a version of the "live" model, it ends up on BIM 360, and that is the version Design Automation for Revit can access.
[Q] Then, I assume that the answer to the main question above is a clear und succinct ‘currently no’?
[A] Correct.
So, all in all, there is currently no alternative to save to the Revit Cloud Worksharing (RCW).
Open/Save operations on RCW are high priority, but no ETA defined yet.
So, whereas DA4R is isolated from Internet access, you computer very probably is not, whether you wish it to be or not.
Jeffrey Paul of EEQJ published an interesting analysis of computer privacy, or the lack of it, hitting a new record with the launch of the new MacOS, in his analysis and documentation on how and why Your Computer Isn't Yours:
... in the current version of the macOS, the OS sends to Apple a hash of each and every program you run, when you run it ... using the internet, the server sees your IP, of course, and knows what time the request came in. An IP address allows for coarse, city-level and ISP-level geolocation, and allows for a table that has the following headings:
Date, Time, Computer, ISP, City, State, App_HashApple (or anyone else) can, of course, calculate these hashes for common programs: everything in the App Store, the Creative Cloud, Tor Browser, cracking or reverse engineering tools, whatever. This means that Apple knows when you’re at home. When you’re at work. What apps you open there, and how often. They know when you open Premiere over at a friend’s house on their Wi-Fi, and they know when you open Tor Browser in a hotel on a trip to another city... ... you can have a fast and efficient machine, or you can have a private one.