Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DetachAndPreserveWorksets in DocumentOpening event

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
444 Views, 2 Replies

DetachAndPreserveWorksets in DocumentOpening event

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);

 

2 REPLIES 2
Message 2 of 3
jeremytammik
in reply to: Anonymous

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

Message 3 of 3
Anonymous
in reply to: jeremytammik

Probably it will fullfill our needs. I'll test it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community