browsing model files in the cloud (A360 C4R)

browsing model files in the cloud (A360 C4R)

Sherbs
Contributor Contributor
7,435 Views
65 Replies
Message 1 of 66

browsing model files in the cloud (A360 C4R)

Sherbs
Contributor
Contributor

Hi Folks,

 

A new client of ours is using A360 C4R to store their model files in the cloud.

 

Configuration of our add-in requires that we indicate which model files are to be "managed" by our application.  At present, we pop up a file chooser dialog to allow the user to select which model files are managed.

 

With A360, however, the built-in wpf file chooser dialog doesn't seem to give us what we need to select model files that reside in the cloud.  It seems to be completely unaware of any cloud based storage.

 

Does A360 expose any of what it provides via an API?  Or is there some other means by which we can present model files stored in the cloud so that the user can indicate which models are to be managed by our add in?

 

As well, once the UNC path is known, is there anything particular to be aware of if/when our addin attempts to open those documents?  Or is that handled fairly seamlessly?

 

I'm not well versed in working with cloud storage so forgive if my questions seem naive.  I've also searched for quite a while today and have not found much on API integration of A360 and/or C4R.  If this has been asked and answered, a link would be very much appreciated.

 

 

Thanks much!

-G

7,436 Views
65 Replies
Replies (65)
Message 2 of 66

Sherbs
Contributor
Contributor
If no one has an idea on this, I'd be happy at this point knowing how to go about opening a document that resides in the cloud.

Let's say I already know the model path as being A360://folder/test_doc.rvt

I've tried opening a document via the API and get an exception stating that it cannot find the file.

Is there any way via the API to access documents that reside in the cloud? Or is this simply not available to us yet?

Thanks for any insight that anyone can provide!

-G
Message 3 of 66

jeremytammik
Autodesk
Autodesk

Dear Sherbs,

 

Sorry for the late response. 

 

I am checking with the development team about the current status of this. Things are moving a lot in this area, as you can imagine.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 66

Sherbs
Contributor
Contributor

Hi Jeremy,

 

In parallel with posting here, my brother (and business partner) opened a case with Autodesk support.

 

For reference, the case number is: 12141097

 

It appears that you responded to him as well so I thought I'd save you the trouble of duplicating your responses...

 

It is fine to respond here or via the support route but I think this information will be of interest to everyone sooner or later.

 

Thanks so much!

-Greg

Message 5 of 66

jeremytammik
Autodesk
Autodesk

Dear Greg and Jason,

 

Thank you very for pointing it out.

 

I did already notice, actually, and combined both of your questions when asking the development team for more information.

 

I definitely prefer continuing the discussion here in public for all to share and be able to chip in on. I'll close your associated ADN case 12141097 [API access to C4R], then.

 

I have not heard back anything official yet, but I have received the following hints:

 

  1. Currently, we don't support managing C4R models through Revit APIs, e.g. listing models, moving/deleting models, opening models etc. Path-unrelated document-based APIs naturally work with C4R models.

 

  1. There is no functionality provided to store non-RVT data in C4R environment. For that kind of use, you can upload your data files to A360 directly.

 

I hope this helps, and am still waiting and hoping for some more positive feedback as well.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 66

Sherbs
Contributor
Contributor

Hi Jeremy,

 

What exactly is meant by "Path-unrelated document-based APIs naturally work with C4R models."?  It sounds like the first part of item 1 in your response in suggests that we are currently stuck as far as managing C4R documents. But that last part that I quoted seemed to suggest something that works?  I can't really tell.

 

 

Thanks much for looking into this!  There really seems to be very little information floating around on it.

 

-Greg

0 Likes
Message 7 of 66

Sherbs
Contributor
Contributor

Hi Jeremy,

 

Just wondering if there has been any progress made or discussion happening within the API team regarding C4R document management.

 

This is really a major hangup for our add-in.

 

We've looked at many workarounds but, simply put, without the ability to open models that reside in the cloud, we are at a standstill.

 

Thanks for any update you can give.

-G

0 Likes
Message 8 of 66

jeremytammik
Autodesk
Autodesk

Dear Greg and Jason,

Thank you for your update, patience and perseverance.

I am re-prompting the development team for an update on this.

 

I hope to have some news on it soon.

 

Best regards,

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 9 of 66

matthew_taylor
Advisor
Advisor

Hi Jeremy,

I hope your prep for AU is going well?

 

This issue has come up for me also.

I've got Revit 2017.1 installed, but no joy.

Support is required for:

UIApplication.OpenAndActivateDocument (Still returning FileNotFoundException.)

ApplicationServices.Application.CopyModel (Even if only to a local drive.)

Amongst other things.

I've hunted through the Collaboration assemblies, and the closest I've found is the

Autodesk.Revit.DB.Collaborate.CollaborateUtils.SaveToCache function...

 

 

Either inclusion in the API, or as a standalone solution (that supports older Revit versions also?) would be great.

 

Can you touch base with the development team to see where we are on this, please?

 

Cheers,

 

-Matt

 

 

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 10 of 66

jeremytammik
Autodesk
Autodesk

Dear Matt,

 

Thank you for asking, both about AU props and the topic at hand...

 

AU preps are going fine. I'm looking forward to seeing you there.

 

Regarding access to web hosted model files, we had a lively discussion on this with the development team following the last prompt, and then it died down a bit.

 

So your new input is very welcome and timely.

 

I passed it on to them, and hope this will liven things up again and raise the priority of this issue further still.

 

Please mention raise it in person when you see Sasha, Scott or Kyle  🙂

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 11 of 66

matthew_taylor
Advisor
Advisor

Hi Jeremy,

I'm glad your AU preparation is going well. Sadly, I'll not be coming to AU this year. Perhaps next.

 

I'm glad the topic has livened up again!

We're very keen to keep progressing, and going to A360/BIM360 needs to be a seamless step. That is, everything that works on desktop needs to work on the cloud.

 

A related topic that I mentioned at some point in the past is providing full open/saveas UI dialog support (via the API); so we don't have to recreate this ourselves.

 

Have a lovely weekend!

 

Cheers,

 

Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 12 of 66

pvella
Alumni
Alumni

Any update on this topic?  

We would like to start Revit and automatically open a C4R based model.  Looks like the path to C4R file starts with 'BIM 360://' but tried sending the path via command line and also OpenAndActivateDocument api method with no success.

Has anyone found a solution?

0 Likes
Message 13 of 66

Sherbs
Contributor
Contributor

As far as I am aware there has been no solution offered by Autodesk.

 

Six months since opening this topic and still nothing despite Jeremy having brought it to the development team's attention on multiple occasions.

 

Given that most of our clients have moved (or are moving) towards cloud based model storage, we are left with an API that provides zero ability to manage the multiple documents that often comprise a single project.

 

In my opinion, this is a fundamental shortcoming of the API.

 

The only "solution" we have found is to gut substantial functionality from our add-in.

 

I'm not sure what has been worse:  the API shortcomings in this area; gutting functionality from our add-in; or the lack of communication from the development team regarding the issue.

 

In any case, I find myself very disappointed.

 

I hope there is some good news on this topic soon.

 

Message 14 of 66

matthew_taylor
Advisor
Advisor

Bravo. I concur.

 

If the user is logged in to C4R/Autodesk, and has access to the model, then a simple upgrade of the 'ModelPath' class should do it.

I understand the complication if the user is not logged in - handling of credentials is required. If the user isn't logged in, just throw a CentralFileCommunicationException or similar.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 15 of 66

jeremytammik
Autodesk
Autodesk

Dear Paul, Greg and Matt,

 

Thank you very much for your patience and renewed prompting.

 

Sorry that nothing has been reported on this yet.

 

I forwarded your updates to the development team and will let you know the newest developments as soon as I hear anything back.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 16 of 66

Sherbs
Contributor
Contributor

Hi Jeremy,

 

Any word or insight from the dev team on this?

 

I'd really like to reiterate the need for full API support for cloud hosted documents (as we have for locally hosted and revit server hosted documents).  Would be great if made as seamless as possible but I'll take any sort of facility at this point.

 

Thanks!

-Greg-

 

 

 

0 Likes
Message 17 of 66

jeremytammik
Autodesk
Autodesk

Dear Greg,

 

I raised this again with the development team in the discussion of a related issue, in a case named HLM-607 [doc.PathName is very slow for a360 project].

 

Here is a summary of what I learned so far:

 

Currently there is not support for opening a C4R model programmatically.  The best way to access the data (today) is to leverage the Forge API to get at the models in a project.  However, it is important to note that the model that is accessible via the Forge API is “detached” from the “source of truth” which is C4R.

 

Supporting programmatic access to C4R models is something that makes sense.  Besides authorization/authentication issues, the Revit API will have to deal with operations that the API can perform on the model that are not currently allowed in a C4R session (e.g. upgrading the model).  Consequently, opening a C4R model programmatically has some technical issues to work through.

 

Unfortunately, I don’t have a good answer that allows programmatic access at this time.

 

Is it possible that accessing the “detached” model via Forge will satisfy the current requirements?

 

The way things are right now, there's apparently not really much these users can do. I think they could figure out whether a model is in the cloud or not, but the forum users seem to want to be able to work with the cloud models, not just filter them out of the things they can work with.

 

I see the following concrete requests on those forum posts:

 

  1. Figure out whether ExternalResource is "missing" or "unloaded"
  2. Use model open API to open a cloud model as long as the user is logged in
  3. List C4R models via some API
  4. Support for ApplicationServices.Application.CopyModel to copy a cloud model to a spot on the disk
  5. Full API support for cloud hosted documents (this isn't specific enough to do anything about but I figured I'd call it out anyway)

 

All of these are really feature requests.

 

Regarding the second forum post, https://forums.autodesk.com/t5/revit-api-forum/externalfileutils-not-working-with-c4r/m-p/6939236

 

I'm not entirely sure what the add-in described there does, so I may be missing large chunk of stuff that they need. It seems like they'd be happy if they could at least open a model via API though. I think the tough part of that isn't really the model open call (it would require some work but obviously Revit does know how to open models from the cloud) but getting the correct information to the plugin. It would have to know the project and model identifiers which we don't expose. It may be possible basically exposing the management service API via Revit API but getting it to gel with the existing file based APIs might be quite the trick.

 

Some of this would definitely be easier with the new Forge BIM 360 Docs integration work because I think enough information will live in Forge that they could query that using their own app key and I think that would give them enough information to build up a string that we could make Revit parse without too much pain. That's all a bit up in the air though until it's actually built.

 

I hope this clarifies where we are right now, even if it does not provide much concrete help of how to solve anything.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 18 of 66

Sherbs
Contributor
Contributor

Hi Jeremy,

 

Appreciate your response and efforts in this area...  

 

Is this the Forge API to which you are referring?

https://developer.autodesk.com

 

If so, I'll dig into it - I'm not at all familiar with this API so I can't yet answer your question as to whether or not it will suffice for our needs.  If this is not the API you are referring to, please point me in the right direction.  As well, what did you mean by "detached" from the "source of truth"?

 

Thanks for any clarification you can provide regarding Forge.

 

 

As far as Item 5 in your post is concerned, Items 2, 3, and 4 would actually fall into that category.  Further, various API calls that assume they are dealing with local files (such as Document.LoadFamily()) would need to be made "cloud aware".  Let's say the family I want to load lives in the cloud and needs to be loaded into the active document for my app to proceed?  What then?  It would be great if calls such as Document.LoadFamily() would take some kind of URL rather than assuming a file system path.  That URL would provide sufficient information to the Revit API so that it would know, behind the scenes, where to look for the family definition.

 

In the end, you did essentially capture what Item 5 is all about in your post when you stated "forum users seem to want to be able to work with the cloud models, not just filter them out of the things they can work with."  It's a broad brush, certainly, but one can easily envision everything moving to the cloud.  The challenge is how will the API adapt and provide the same functionality to us that it currently does for non cloud hosted models, families, etc.

 

I hope that clarifies things a bit.

 

Thanks again!

-Greg-

 

Message 19 of 66

GallowayUS_com_RonAllen1
Collaborator
Collaborator
A comment so I can track this easier... is the REST forge api going to migrate to GraphQL any time soon?

I need to dig into FORGE (unfamiliar with Web based coding beyond HTML) as I want a quick api to pull files from 360 or publish files to C4R for updating from folks determined to be stuck in Procectwise.
Ron Allen
Galloway BIM
0 Likes
Message 20 of 66

jeremytammik
Autodesk
Autodesk

@GallowayUS_com_RonAllen1 i hardly expect so... it is a huge system, you know, and many already depend on it, so hard to change... i'm checking for you, though. maybe long-term?



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes