PDA

View Full Version : Command Line Switches



cstarr
2006-12-14, 07:19 PM
Does Revit have any command line switches? I would love to create a shortcut on my users desktop that would open Revit using a template I specify in the shortcut rather than relying on them to change their default template each time they change project types or go to File>New>Project and finding it (too many clicks you know :) ). I work in a very large office and I know that my users won't even think about what template they are using until it is way too late...they will just hit the 'new' button.

aaronrumple
2006-12-14, 07:41 PM
Does Revit have any command line switches? I would love to create a shortcut on my users desktop that would open Revit using a template I specify in the shortcut rather than relying on them to change their default template each time they change project types or go to File>New>Project and finding it (too many clicks you know :) ). I work in a very large office and I know that my users won't even think about what template they are using until it is way too late...they will just hit the 'new' button.
You can change the template used when Revit is loaded under Settings-Options.
There are no startup switches.

cstarr
2006-12-14, 07:43 PM
I know you can change the template under Settings, my concern is that they won't. I was looking for a more automatic way of doing it.

One can dream...

kpaxton
2006-12-14, 07:45 PM
I'm sure that someone who knows the API will certainly pipe up and give their comments...

..but until then, let me try: Currently, there isn't a 'command-line' that I'm aware of that would allow what you're attempting to do, Which is to reduce/prevent user error upon opening up Revit or starting a new project from scratch.

Currently, you start Revit, and do a File >New > Project - which brings up the New Project dialogue. This is set to the Default Template that you specify under Settings >Options >File Locations > Default Template file . Of course you're relying on your users to be aware of which one to use. IF you set this up simply, this shouldn't be a problem.

To alleviate this, you could use the following setup:

Under your Library file structure, create a folder for Project Startup Files.
Open up Revit, and create a New Project (as stated above) using your Commercial Template, for example.
Do a Save As in the new Project Startup Files folder and give it an understandable name. Do this for each of your template files (Commercial, Residential, etc.)
Create a Shortcut for each of these Project files on your desktop and each user's desktop.
When needed, your users now only have to click on the shortcut, which will start Revit and open up a 'dummy' template file.
Once opened, have your users do a Save As to their project folder.
This will keep the users away from accidentally messing with the Template files and will allow you to make updates to the Dummy Templates on the fly, by just replacing the files in that folder.

Personally, I don't think you should have to do this - If they want a different Template from the one that is set, train them the proper way. But this is your choice.

Kyle

cstarr
2006-12-14, 07:53 PM
I was just looking for a way to make it transparent for my users to create new project types based upon templates that I have created. They are smart people and they haved been trained properly, but they are also busy and I am just trying to take one more potential mistake out of the equation. I work for a very large firm and user error is not an IF, it's a when.

aaronrumple
2006-12-14, 08:06 PM
A network deployment when Revit is installed will take care of the template option and set it the same for all workstations.

Delete the other templates if you really don't want them to be used.

cstarr
2006-12-14, 08:08 PM
That's great if everyone in my office worked on the same type of project. I have Healthcare, Residential, Government, Hospitality, Planning, etc...All with different needs. I just want to make sure they are using the right one.

Thanks for all the input.

aaronrumple
2006-12-14, 08:14 PM
Then even startup switches wouldn't help.
That would require different icons on the desktop for each project template and once Revit was open, it would continue using that template for the entire session. So someone could easily start the wrong "version" or forget to switch profiles when they start a new project.

cstarr
2006-12-14, 08:17 PM
Listen,

The horse is dead.

A simple question has been answered. Thank you.

robert.manna
2006-12-15, 01:49 AM
You may want to consider some sort of solution that would re-write the .ini file prior to Revit being actually started by the user. This way you could affect what the default template is before they enter Revit. This would not involve the API, but rather typical programming like a bat file with some options.

HTH,
-R

Steve_Stafford
2006-12-15, 06:23 AM
...The horse is dead...The management of AUGI and the Revit forums would like to reassure everyone that no horses were harmed or killed during the creation of, or the duration of, this thread. Thank you!

Pop over to the API forum and put a link to this subject to see if you can get the attention of the programming minds like Danny P. or Guy R...others... I'm pretty sure you could write a little app (for use inside Revit) that your users could run to start their projects correctly. Even if you resort to what Robert suggests you should be able to make the process a little more predictable as you say. Best of luck!