Is there a way to use Project Properties conditionally in a MicroStation Workspace? There is a technique to do this, simply create a Workspace Variable at the Command Line using the –ws switch.
The -ws switch creates a Workspace Configuration variable before any configuration file is read.
Hint: Click Add to get the correct syntax for any System Variable or Project Property.
Now, the workspace is able to use the variable. For instance, a conditional statement could load a cell library specific to the project based upon country:
MSCELLLIST > ukcells.cel
The same technique can be used with System Variables and Windows Variables.
We are still waiting on examples and explanations on this Adrian.
Adrian, the facts about interpreting values should be explained in the documentation. It's now understood that the file spec argument values don't exist until after execution, but better documentation would have averted a lot of wasted time. Perhaps include a list of what properties that can be utilized? We'd like to see additional examples!
The # is the correct syntax. ProjectWise Explorer is actually interpreting the value before launching MicroStation. Therefore the syntax sent to MicroStation is the actual value from ProjectWise.
Secondly, and document specific system variables are not recognized as the file specs are not sent until after MicroStation Startup. Once MicroStation is started up, ProjectWise system variables are not understood.
I am trying to utilize this but to call the project number from the project properties and I am having no luck.
I put this in the App Association: -wsPRJNUM=$PROJECT#PROJECT_Project_Number$
and then place a var in a cb: PROJECT_NUMBER = $(PRJNUM)
It is not working for me cause it is not returning the project number from the project properties. any suggestions?
In attempting to utilize these variables, we obtain the following return errors from the command line when using the following variable switch from the "Open" action of the Application:
Last Error [ 50000 ]
Cannot start application for the specified document. Check your program associations.
The variable name "$DOCUMENT.FULLNAME$" was not resolved.
Same goes for "$DOCUMENT.FULLDESCR$
We'd like to be able to utilize those on the command line, but appears are not being resolved at the command line.(?)
(Please delete the prior comment, as was improper use of the Project Property. Fri Jan 20 2012 10:51 AM I do not have permission.)