Old topic brought back - changing link paths to Cloud paths

Old topic brought back - changing link paths to Cloud paths

dantartaglia8696
Advocate Advocate
2,256 Views
8 Replies
Message 1 of 9

Old topic brought back - changing link paths to Cloud paths

dantartaglia8696
Advocate
Advocate

Hi,

I'm trying to use: TransmissionData.SetDesiredReferenceData() Method to change my Revit linked paths to a Next Gen BIM 360 Design project but of course I cannot do this because there is no 'Cloud' member for: PathType. Two questions: Will PathType ever have a 'Cloud' member or is there another way to change the link paths programmatically to point to cloud paths?

 

This is a similar request as: https://forums.autodesk.com/t5/revit-api-forum/how-quot-reload-from-quot-reload-local-file-to-a-mode...

 

Thank you,

Dan

0 Likes
Accepted solutions (1)
2,257 Views
8 Replies
Replies (8)
Message 2 of 9

jeremytammik
Autodesk
Autodesk

Dear Dan,

 

Thank you for your query and the pointer to the related discussion thread.

 

The thread you refer to contains one hint which is still valid, right at the end:

 

You can use the reload functions which take an ExternalResourceReference argument, not the ones which take a path. The complicated bit here is that every provider determines their own internal structure for ExternalResourceReference, so you need to figure it out by calling GetExternalResourceReference on existing A360 links.

 

Another related thread is this one on ExternalResourceReferences change information and reload it:

 

https://forums.autodesk.com/t5/revit-api-forum/externalresourcereferences-change-information-and-rel...

 

Oh no, that is not the one I was after... hang on...

 

Here it is:

 

https://forums.autodesk.com/t5/revit-api-forum/changing-a-cloud-revit-link-to-local-revit-link-revit...

 

In that thread, David Rock describes how to change a cloud Revit link to a local one using the  ExternalResourceReference.CreateLocalResource method.

 

Oh dear, that is more or less the opposite of what you are asking for, isn't it?

 

Do you wish to move your local Revit model to BIM360 cloud storage?

 

Why don't you just go the easy path of using the Forge API to upload it there?

 

There are lots of examples showing how that can be done.

 

Once it is in cloud storage, the other, existing discussion threads show how you can get it back to local again.

 

Maybe it just is that simple, and that is the reason there are fewer threads asking the question you are tackling?

 

I hope this helps.

 

Best regards,

 

Jeremy

 



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

Message 3 of 9

dantartaglia8696
Advocate
Advocate

Hi Jeremy,

I'm not sure I relayed the problem correctly. Here is the scenario: we have 100 workshared RVT's in conventional Revit. We need to do two things: 1. Add the 100 RVTs to a BIM360 Design project as cloud models (manually in Revit, typically use the Collaborate tab). 2. Change all the links for each model to point to the needed BIM360 RVTs as links (I should be able to get the hub, project and folder GUIDs).

 

My approach was coming from starting with the Revit API and conventional Revit. 1. Open each RVT and change the link paths to point where the BIM30 links will existing (again, I can get the GUIDs mentioned). 2. Upload all the models to BIM360 Design to the designated folders and have all the links be correct.

 

Questions: In Forge, can you create C4R (Working sharing in cloud) models from conventional RVTs? (I didn't see any examples for doing this). Change the link paths?

 

Is there a general logic I should use?

 

Thank you,

Dan

 

0 Likes
Message 4 of 9

jeremytammik
Autodesk
Autodesk

Dear Dan,

 

Thank you for your update and clarification.

 

Put like that, the issue sounds much more interesting now.

 

I'll have to think about it a bit, and consult with colleagues.

 

Hang on, please, while I do so.

 

Best regards,

 

Jeremy

 



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

0 Likes
Message 5 of 9

jeremytammik
Autodesk
Autodesk

Dear Dan,

 

Thank you for your patience and sorry this important question is taking longer than expected to answer.

 

The same question was also raised in StackOverflow in the thread on how to Initiate BIM360 Docs collaboration programmatically:

 

https://stackoverflow.com/questions/53892870/initiate-bim360-docs-collaboration-programmatically

 

We have raised the question with the Revit, C4R, Forge and Desktop Connector development teams, and lively discussion have ensued with no clear answer in sight yet.

 

We are researching as hard and fast as possible and will provide a more conclusive answer asap.

 

Best regards,

 

Jeremy

 



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

Message 6 of 9

dantartaglia8696
Advocate
Advocate

Hi Jeremy,

 

I knew there wouldn't be an easy solution, thank you for looking into it. I'm sure it would help a lot of other users once a solution is discovered.

 

Thanks,

Dan

0 Likes
Message 7 of 9

jeremytammik
Autodesk
Autodesk

Dear Dan,

 

Thank you for your update and appreciation.

 

There absolutely should be an easy solution, and we are working on making an easy solution accessible, and soon, so don't worry about it being hard.

 

You might worry about the interim until it is made available.

 

I still hope a workaround might help bridge this interim, such as the one you have attempted.

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 8 of 9

jeremytammik
Autodesk
Autodesk

Dear Dan,

 

Thank you for your continued patience.

 

As I just mentioned in the StackOverflow thread I pointed out above:

 

The development team are still discussing this issue. Meanwhile, they also said:

 

This request is recorded in the development issues REVIT-140793 and REVIT-116912.

 

There may be a workaround to achieve what you need.

 

Revit 2019.2 and future releases include support for the "Single user workflow" -- that is the non-workshared cloud model. At the same time, they expose the API to initiate the non-workshared cloud model and convert the non-workshared cloud model to a workshared cloud model (C4R).

 

So, I think you can use the single user APIs to workaround the cases you mentioned as follows:

 

  1. Save the downloaded files and non-workshared files (local files).
  2. Initiate non-workshared cloud model through the API call to `Document.SaveAsCloudModel`.
  3. Convert it to a C4R model via the API `Document.EnableCloudWorksharing`.

 

I am checking whether this functionality is already available in pre-release version accessible via the beta forum.

 

Please let us know whether his helps.

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 9 of 9

jeremy_tammik
Alumni
Alumni
Accepted solution

Dear Dan,

 

I heard back from the development team. They confirm that the methods pointed out above are indeed available in the pre-release version in the beta forum.

 

Cheers,

 

Jeremy

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open