Fastest way to access workshared Document

Fastest way to access workshared Document

lwlXUTTT
Advocate Advocate
393 Views
3 Replies
Message 1 of 4

Fastest way to access workshared Document

lwlXUTTT
Advocate
Advocate

Dear Community,

 

My question would be rather of type 'know that' rather than 'know how'.

Assuming the scenario: I have external Mongo DB, from which I get a List of ViewSheetIds (UniqueId), which should be printed from the given Document (Project Workshared Document). BatchPrint Command will be fired from Zero-Document-State, in the sense that Revit Application is initialized and running, but no Document is open. What would be the fastest and most effective way to:

  • open Document in the background (only to access ViewSheets)
  • //get Print-job done
  • close Document

Any feedback from your experiences would be much appreciated,

Lukasz

0 Likes
394 Views
3 Replies
Replies (3)
Message 2 of 4

dtartaglia_PYEBEB5KA84W
Enthusiast
Enthusiast

This is an old article but the logic still works: https://jeremytammik.github.io/tbc/a/0957_auto_pdf_print.htm

0 Likes
Message 3 of 4

lwlXUTTT
Advocate
Advocate

Hello there!

Thanks, the workflow itself I have set up - I am more concerned about the sole action of opening Revit Project Document.

In the example, which you have mentioned, RvtDocument is opened in the background as a Detached Model, using method:

 

doc = uiApp.Application.OpenDocumentFile(modelPath, openOpts);

 

in my case it takes a while, therefore I was wondering whether there is any faster way of doing that....

 

/the idea is that non-Revit users(newbies) can print data from WPF-Window interface without opening Revit Document/

 

any other inputs would be much appreciated!

Lukasz

0 Likes
Message 4 of 4

dtartaglia_PYEBEB5KA84W
Enthusiast
Enthusiast

If you are using the Revit API, there is no other way I know of (I was told in the past that was on purpose). I'm not sure if what you are trying to do can be done at this point with the "API's formally known as Forge". Either way I hope a faster solution is posted too but...

0 Likes