Hi,
I am developing an application in C# AddIn I have created a windows based form with dockable. so when i give KeyIn in Bentley Map v8i "mdl load UGD" UGD is loaded next "UGD CASE UGDOPEN" My form will be opened.
now my task is to open Bentley Map v8i with configured geospatial administrator XML(My own User Workspace is created thru GSA and is defined in some path) with all the settings and configuration made above i.e once i click the button, software has to check whether bentley is installed or not if yes open bentley map with configured settings right from the symbology file(e.g .rsc,.cel,etc...) with the KeyIn as above(including the form).
I am using Bentley Map V8i (bm08110549en), Microstation V8i(ms08110517en).
Please help me in doing so waiting for your valuable response.
Regards,
Praveen E
Hi Praveen. I'm not quite sure I understand your question. I will assume that your C# application is a stand-alone Windows application in which you want a button to launch Microstation + Bentley Map. In order to do that you must use the "-wu" parameter of Microstation and specify the GSA-generated workspace you want to use. This should start Map in your Microstation session.
Since you must choose a "Bentley Map" workspace to launch Bentley Map, it is too late to launch it when you are executing keyins inside Microstation as the workspace sepection occurs when you choose the dgn file to edit.
Thanks,
Martin
Thks Martin i tried with my Workspace generated .ucf file(GISDRAINAGE_GIS_DRN.ucf)
The above ucf file i am executing in Command prompt as
"C:\Program Files\Bentley\MicroStation\ustation.exe" -wuGISDRAINAGE_GIS_DRN ms_geodgndir:work.dgn
and is working fine and openinng the bentley map of the user workspace(GISDRAINAGE_GIS_DRN). till here it is working fine.
but how to pass key in i have 2 keyin(mdl load UGD and UGD case UGDOPEN).
According to Microstation once it is opened i need to pass this key ins all this things has to occur after button click...
Praveen: I am executing in Command prompt as "C:\Program Files\Bentley\MicroStation\ustation.exe" -wuGISDRAINAGE_GIS_DRN ms_geodgndir:work.dgn How to pass key in i have 2 keyin(mdl load UGD and UGD case UGDOPEN).
You're asking two distinct questions:
You have answered the first question already. As far as the second question is concerned in MicroStation's case, you can specify an MDL to be loaded by specifying it in configuration variable MS_DGNAPPS. Put something like this in your GISDRAINAGE_GIS_DRN.ucf:
MS_DGNAPPS = UGD
Regards, Jon Summers LA Solutions
Praveen,
As Jon suggests, use of the MS_DGNAPPS variable is the preferred method for loading one or more MDL applications during MicroStation (or Bentley Map) session startup. For other keyins, you can set the MS_GEOINITCMD environment variable in your workspace such as the following...
MS_GEOINITCMD = My First Keyin Command;My Second Keyin Command
...for the keyins you wish to have processed when Bentley Map starts your workspace. Please be sure to separate multiple keyins as shown. As with any environment variable that supports multiple values you can also use the prepend and append operators such as...
MS_GEOINITCMD > My First Command
MS_GEOINITCMD > Another Command
...to add multiple values from one or more workspace configuration files.
Jeff Bielefeld [Bentley]
Thks for the Info i will try with that.
But first GSA xml and its workspace(created by GSA) is in server system can i able to access the userworkspace which is in server from the client system?
In the server we have it in "C:\Program Files\Bentley\WorkSpace\GISDRAINAGE\GIS_DRN\dgn\work.dgn" the bold one are generated by GSA XML which is again in Server.
Now i want to access this dgn from client in write mode?
help will be useful for me.
In your case the GSA puts this on the server, which is fine. Now from the workstations, you need to point to this workspace. You can provide full paths ( ie z:\path\...\... ) or use a unc ( \\servername\share\...\...) to point to the workspace. Easiest way to get started is to create a shortcut from within the GSA, for the workspace you are exporting and then copy/edit it for your use.
HTH
Jerry
For reference, you can add the MS_GEOINITCMD environment variable definition in the "Macros" section of your workspace using the Bentley Geospatial Administrator.