As David says, no switch required to load the RVT model. Just list it on the command line with Revit.exe and Revit will open it.
Similarly for add-ins: no switch required. Revit will load them as specified in the add-in manifests located in the add-ins folder in the standard manner.
How can you open a file in a particular version with process.start? I've tried many variations of the path to the .exe and the path to the file and always get an error message. (File opens fine through UI.) Thanks.
Replying on Command Line switches,
are there StartUp switches using Revit?
Is there a way to start revit (from API or add switch to .exe) using a specific .rte?
For now you can select a template after starting Revit, I would like to do it before I start Revit.
In my case I wanted to start Revit with a particular file before it was opened. I used the Idling event that looks for a txt file with a path in it. As soon as Revit is finished loading, the idling event kicks in and finds the txt file and processes it with the API commands.
using the Idling event is a possible approach, but not one I recommend. For this kind of a problem (start Revit with a particular file via the API), I suggest using the ApplicationInitialized event instead.It is raised by Revit only once after the application is initialize and after add-ins were started too. In the handler of the event you can use the OpenAndActivateDocument - it would work as long as there is no active document open yet, which can be easily tested, though.
Thank you for the good advice!
Look at these in-depth discussion of this all-to-unknown event:
Please submit it to the Revit idea station:
I am looking for Revit switch that would enable autpmatic load of Revit file as a local (silent mode). Reason- I need to get Dynamo Automation working on Central files ( I have about 80 files to process every iteration)
I explained my line of investigation here:
Please, advise if it is possible to "decentralize" revit file via python script
Thank you in advance!
Happy New Year to you!
You have no need for any additional switch to auto-load a document on Revit start-up.
Just providing the full document path is sufficient, e.g.:
C:\>"C:\Program Files\Autodesk\Revit 2017\Revit.exe" Y:\a\rvt\Test.rvt
I know this is not in answer to the last question, but it may be useful to others higher up the conversation.
These are the switches etc I'm aware of (tested in Revit 2017):
*no switch* <fully qualified path of file to open> (Opens a Revit file. Seems to work with a template or project file. Haven't tried a family. I've been doing this since Revit 2011, though I put /o in there so I know what it is, though that seems to be ignored.)
*no switch* <fully qualified path of journal file> (Replays a journal file.)
/language <language code such as ENU>
/viewer (Launch Revit in viewer mode.)
thank you for the succinct summary!
I promoted it to a blog post for better legibility and future reference:
Search the Autodesk Knowledge Network for more content.
Windows 10 Support
Autodesk Online Store Help
Serial Numbers & Product Keys
Installation & Licensing
Online Activation & Registration
Manual Software Activation
Network License Administration
Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.