Is there a way to get open docs that the user has open in an instance of Revit. I dont mean background open. I am working on a graph to transfer view templates and the workflow would be much better if I could work with a doc that the user already has open, but is not the active doc.
Yes and no. Dynamo will only run in the active doc, but the API is built to handle any specified document it can access (in the “background”). This doesn’t mean you have to open a document in a headless instance of the app, it just means that you have to interact with the document itself. Any linked document is already accessible through the active doc. If you want to open a different document in the same instance of Revit and reference that project, you’ll have to check the Application for opened documents.
so where would I look then? Application class? Doc class?
Both. You’d get the Document from the Application. Then you’d likely use the Document class (usually as an argument) for the rest of your code.
Some time ago it was Free