Cannot finish opening BIM 360 model using: OpenAndActivateDocument() in an Idling event

Cannot finish opening BIM 360 model using: OpenAndActivateDocument() in an Idling event

dantartaglia8696
Advocate Advocate
245 Views
2 Replies
Message 1 of 3

Cannot finish opening BIM 360 model using: OpenAndActivateDocument() in an Idling event

dantartaglia8696
Advocate
Advocate

Hi,

 

If I use this code in an Idling event the model opens (I think) but Revit stops processing and keeps the 'Open Model' dialog on the screen (Revit isn't frozen, the 'Open Model' dialog can be moved around but does not close). If I use OpenAndActivateDocument() in the same Idling event to open a conventional RVT it works correctly. The test project is in the US, I deleted the BIM 360 cache, computer temp files and preference files. The same model opens very quickly if I do so manually in Revit 2022. Any ideas? I guess either an issue with my code, OpenAndActivateDocument() should not be used in an Idling event or it's an API issue. 

 

P.S. I use OpenDocumentFile() in the same manner to automate printing and it works fine with BIM 360 models.

 

Guid oProjectGuid = new Guid("36d1c256-321c-4b5a-8672-b15848836dae");
Guid oModelGuid = new Guid("82e392bf-46a6-4638-acbb-c04425a071e0");
ModelPath oModelPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(ModelPathUtils.CloudRegionUS, oProjectGuid, oModelGuid);

OpenOptions oOpenOpts = new OpenOptions();
UIDocument oUIDocument = oUIApplication.OpenAndActivateDocument(oModelPath, oOpenOpts, false);

 

Problem.png

Thanks for any assistance,

Dan

 

0 Likes
246 Views
2 Replies
Replies (2)
Message 2 of 3

dantartaglia8696
Advocate
Advocate

Hi,

 

Has anyone else tried this? Can Autodesk tell me if this a 'works as intended', bug or other?

 

Thank you,

Dan

0 Likes
Message 3 of 3

dantartaglia8696
Advocate
Advocate

It would be great if someone from Autodesk had an answer.

 

Thank you,

Dan

0 Likes