MicroStation V8i (SELECTseries 3)
I have to change Format on a number of .dgn file from MU:SU:PU to Std MU and the Accuracy to 0.1234 or 0.0000, I figure there is either a VBA command (not finding) or
a super Key-in command. I asked the question a few various ways did not read any examples I needed. I saw a comment on the "tcb-> command and on MDL ...... nothing.
appeared it was for the above. I also found this command:
Sub Accuracy4()' 122113 Drawing Accuracy setting, TEST ActiveSettings.CoordinateAccuracy = msdAccuracy4 CadInputQueue.SendKeyin "m,ms Set Accuracy 0.0001"End Sub
Did not seem to do anything. Can someone help me on this?
Clarification : the Accuracy4 will change the 0.12 to 0.1234, I had failed to load the VBA after puting it in. I went Back and It works, Sorry
So If someone knows the command for changing MU:SU:PU to just MU I am good, unless there is a Key-in for the Accuracy also.
Version: MicroStation V8i SS 10
RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus
a couple of comments:
Richard Phillips said:I figure there is either a VBA command (not finding)
How to modify working units using VBA code was discussed several times already, search for these discussions.
BTW it's questionable whether "VBA command" is correct terminology, there are MicroStation key-ins and VBA code, but VBA command?
Richard Phillips said:or a super Key-in command.
There is nothing like "super Key-in command" in MicroStation. Again, it's about proper terminology, and MicroStation has key-ins.
Richard Phillips said:I have to change Format on a number of .dgn file from MU:SU:PU to Std MU and the Accuracy to 0.1234 or 0.0000,
Working units are always set for model, not dgn file. So it's always good to specify whether there can be more models in dgn file(s), so the same code (or key-in) has to be used for individual models, or there is always one (default) model only.
Richard Phillips said:I saw a comment on the "tcb-> command
It seems to me you try to do very simple thing in extremely complicated way. As I wrote above, it's was discussed several times already. e.g. here.
Richard Phillips said:I also found this command:
Maybe it works, but it's completely wrong approach in my opinion.
What about to use simple VBA code:
ActiveSettings.CoordinateFormat = <MsdCoordinateFormat>
ActiveSettings.CoordinateAccuracy = <MsdCoordinateAccuracy>
See MicroStation VBA documentation for values of MsdCoordinateAccuracy and MsdCoordinateFormat values.
In your case, they probably will be
ActiveSettings.CoordinateFormat = msdMasterUnits
ActiveSettings.CoordinateAccuracy = msdAccuracy4
And when used as key-ins:
vba execute ActiveSettings.CoordinateFormat = msdMasterUnits
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy4
But as I wrote already, everything was discussed in the past...
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Again my hat is off to you. Terminology is paramount and I am learning the terms. as you stated they are needed. As to the super key-in, I do know they are key-ins the Super was my poor approach at using a
superlative to express my opinion of the Key-ins tool (it is super to me) itself, sorry for that. I only work-in 1 view, I always just turn off all the others. if that is an answer to the default mode ? I really do want the simple way, but when I see something that may work, I am ignorant (no kidding !!! Joke I am) on simple or hard. It seems I do not know the correct structure to search the question you refer to . I put a few ways in help and on line. thumbs down to my question ability. Even in goggle I try a number of ways and sometime due to do you mean ......... and a different way to ask question is recommended. So Thank you for the answer Jan and if you are willing I would love to see, learn and use the simple way. Thank you Richard
Jan if you will type the question, for me to read, I will do the work to search and read, but I am asking wrong, due to the terms of cod, keyins and the names I use (incorrect) commands and Key-in. I am trying to learn and you appear from reading some of your reply to others are
top knowledge, but maybe no to tolerant with rookies like myself. I did design PLC controls, but as electrician using Ladder Logic
I was able to do that. Designed the entire flour system from the silo's to the Bread, Buns and Honey Bun Mixers. I designed, wired and phased into service. All self-trouble shooting down to which switch and which direction it failed Extended or retracted and which fuse was blown and its location. I did drawings in AutoCad bare bones, all manual. Different fields. Your knowledge is valuable here, mine is nothing but a memory of the past. 2009 was my last year of 33 for Wonder. NO wonder I do not know Hahaha God bless and thank you again.
Jan, I found this statement:
For all possible values of accuracy constant, see MsdCoordinateAccuracy Type description in MicroStation VBA help (delivered with all MicroStation installations).
I opend VBA, and then the help. I typed in the following
msdcoordinteAccuracy and I must have misunderstood something because this is what I got.
I was hoping to find all the various code you know for many of the items listed in Settings>Design File>
some seem to have key-ins like KY= <VALUE>
seems every drawing I get it is a 1 and the 2 works so much better. I also like to set the two colors
for element highlight and Selection color, a quick Key-in or V code, I was using the term command because I was reading the statements or Code
and many say : CadInputQueue.SendCommand or CommandState.StartDefaultCommand Another error, I do want to learn the proper terms to converse and ask questions correct. I do search, as I have head others do. I was told once use goggle it works better ? I need to try that with these commands or code. As always thank you for any help.
Richard Phillips said:I must have misunderstood something because this is what I got.
You opened VBA help file, not MicroStation VBA help. There are two different chm files!
Jan, so hate to ask, I know how to open help F1, or I know how to open VBA project manager>open visual basic editor and then the help. But do not know how to load or open the Microstation VBA help. Is is possible you would tell me or give me a link. I have been checking ? I even did a search on the communities > Search and put in
for sure I am missing something. Any other information you would pass on?
Richard Phillips said:But do not know how to load or open the Microstation VBA help
did you try use F1?
Richard Phillips said:Is is possible you would tell me or give me a link. I have been checking ?
The most simple way is to simply search MicroStation installation, e.g. using Windows Explorer to search MicroStation folder (usually MicroStation V8i (SELECTseries)\MicroStation\) for *VBA*. It gives you a couple of findings...
... and voilà ... MicroStationVBA.chm is found in the same folder where ustation.exe is located.
Richard Phillips said:How to load or open the Microstation VBA help?
Look at this article about VBA help.
Once you've located that .chm file, use Windows to create a shortcut (right-click) and place that shortcut on your Windows desktop.
Regards, Jon Summers LA Solutions
Will DO and thank you so much. I was somewhere yesterday
reading a page of information you posted to help folks.
hope it is ok to add that information. Heading to try the link you gave me. and thank you and Jan again for helping this old man who also has a poor memory, @ 74 (c;
I wrote several MVBA code as below link:
The set working unit code is as below:
Sorry, all contents are in Chinese but code is same. You can use Google translator to turn to English.
well thank you for being willing to help. I will attempt to get a person to assist. on the Goggle translator. Do appreciate