DetachAndPreserveWorksets in DocumentOpening event

DetachAndPreserveWorksets in DocumentOpening event

Anonymous
Not applicable
689 Views
2 Replies
Message 1 of 3

DetachAndPreserveWorksets in DocumentOpening event

Anonymous
Not applicable

Hello,

 

I need to implement automatic local copy opening for our rvt files. Can I somehow use OpenOption in DocumentOpening event so that to decide prefereble openoption at runtime.

 

I found folowing example, but can't find a way to in DocumentOpening event.

               

OpenOptions openOption = newOpenOptions();

                openOption.DetachFromCentralOption =

DetachFromCentralOption.DetachAndPreserveWorksets;

               

ModelPath modelPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(targetFile);

               

Document openFile = uiApp.Application.OpenDocumentFile(modelPath, openOption);

 

0 Likes
Accepted solutions (1)
690 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear evgeniy_bannikov,

 

Please look at the new option provided for opening document files in Revit 2014:

 

http://thebuildingcoder.typepad.com/blog/2013/04/whats-new-in-the-revit-2014-api.html

 

Do they fulfill your needs?

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 3

Anonymous
Not applicable
Probably it will fullfill our needs. I'll test it.
0 Likes