Hello,
Firstly, why do I want read - only? I am often checking design files and do not want to change anything. Other times I may want to edit the design file. I am attempting a simple tool to run a key-in the switch into and out of read-only mode (close design and re-open design).
I am having some difficulties with this effectively changing MicroStation to read-only.
Using the keyin expand set MS_READONLY = 1 will change the active design file to read-only in memory only (does not save the ucf file). This can be checked using the keyin expand echo $(MS_READONLY) and viewing the message center details.
Closing the design file will show the open as read only option as greyed out, but not selected. See attached screen shot.
Opening the design file again does not open in read only mode.
Am I missing something or doing something wrong here? Any help please.
Thanks,
Chris.
Again, thanks everyone. I think I need to follow Tim’s advise and will look into the VBA or MDL options.
I dont think a keyin is going to do what you want. I believe you will need to involve VBA or MDL to do this.
Timothy Hickman
CADD Manager | CADD Department
timothy.hickman@colliersengineering.com
Main: 877 627 3772|
1000 Waterview Drive Suite 201 | Hamilton, New Jersey 08691
MicroStation will write the variable upon exiting out of Microstation. When Microstation is then re-open the new value of the variable is then processed.
Answer Verified By: Chris Albany
Thank you all for your suggestions - I do like the send to option.
I have travelled a little further along the keyin route but now get stumped trying to exit and reopen MicroStation.
Using expand setsave MS_READONLY = 1;exit;newsession;$ rd= $(_DGNFILE) does not progress past the exit command. Once MicroStation exits, it cannot run further keyins, so I assume the keyin line is not read to memory first, or dumps it when exit is encountered.
Chris,
A configuration variable defined using EXPAND SET remains defined only for the remainder of the current session. To specify a configuration variable definition and at the same time save it in the user configuration variable for reference in subsequent sessions, use the EXPAND SETSAVE key-in.