Is there a key-in I can pair with the one below for setting the accuracy under the Working units? I was hoping to set up a batch to change this.
-SET UNITS [Master] [Sub]
Jan - glad to see I am in hte same hemisphere as someone else.
this gave me the final peices I was looking for - Thnaks
I did find an error in the documentation though.
for Metric Accuracy it starts with 1 not zero
1 = 1
2 = 1.2
3 = 1.23, etc
Also = is required in the statements
vba execute ActiveSettings.CoordinateAccuracy=Half works
vba execute ActiveSettings.CoordinateAccuracyHalf does not work
Then things don't work with the limited knowlege I have:
vba execute ActiveSettings.CoordinateAccuracy=Half This works fine
vba execute ActiveSettings.CoordinateAccuracy=1 This Works Fine
vba execute ActiveSettings.CoordinateAccuracy=8th does not work
vba execute ActiveSettings.CoordinateAccuracy8th does not work
vba execute ActiveSettings.CoordinateAccuracy 8th does not work
vba execute ActiveSettings.CoordinateAccuracy=eighth does not work
vba execute ActiveSettings.CoordinateAccuracyeighth does not work
vba execute ActiveSettings.CoordinateAccuracy eighth does not work
The Same for 16th and so on
Ustn since 1988SS4 - i7-3.45Ghz-16 Gb-250/1Tb/1Tb-Win8.1-64bEric D. MilbergerArchitect + Master Planner + BIMSenior Master Planner NASA - Marshall Space Flight CenterThe Milberger Architectural Group, llc
Hi Eric,
Unknown said: I did find an error in the documentation though. for Metric Accuracy it starts with 1 not zero 1 = 1 2 = 1.2 3 = 1.23, etc
There is no error in the documentation, because the values are not important ... never. The only important are the names of constants (exactly they are members of MsdCoordinateAccuracy enumerator, which is a construction used in SW development) . It's not required the corresponding values are defined in any logic system:. Imagine a situation after few versions of ('any) software, you will realize you have to add a new option in your list. In the discussed case it can be e.g. accuracy of tens of units (so a readout of 8 will be 10). You will add a new constant name msdAccuracyTensOfUnits and will add a next free value (e. 1000). The result: Names are easy to understand, the code is easily readable, but the new value looks like accidental ;-)
Unknown said: Also = is required in the statements
Yes, because key-in vba execute means "Interpret the rest of the key-in as VBA code. And the code is ActiveSettings.CoordinateAccuracy = msdAccuracyHalf. The explanation is:
Unknown said: Then things don't work with the limited knowlege I have: vba execute ActiveSettings.CoordinateAccuracy=Half This works fine...vba execute ActiveSettings.CoordinateAccuracy eighth does not work
vba execute ActiveSettings.CoordinateAccuracy=Half This works fine...vba execute ActiveSettings.CoordinateAccuracy eighth does not work
You have to use names, exactly as defined in MicroStation VBA documentation:
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracyHalfvba execute ActiveSettings.CoordinateAccuracy = msdAccuracy0vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy8th
If you are familiar with VBA and VBA editor, you can try to type code there. It's easier, because the editor offers the possible values automatically.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I am not able to put ActiveSettings.CoordinateAccuracy = {number}ie ActiveSettings.CoordinateAccuracy = 5 did nothing as a direct key-in I have vba that will change the accuracy examples:
ActiveSettings.CoordinateAccuracy = {number}ie ActiveSettings.CoordinateAccuracy = 5 did nothing as a direct key-in I have vba that will change the accuracy examples:
Sub Accuracy2()' 122113 Drawing Accuracy setting, TEST ActiveSettings.CoordinateAccuracy = msdAccuracy2 CadInputQueue.SendKeyin "m,ms Set Accuracy 0.01"End SubSub Accuracy3()' 122113 Drawing Accuracy setting, TEST ActiveSettings.CoordinateAccuracy = msdAccuracy3 CadInputQueue.SendKeyin "m,ms Set Accuracy 0.001"End SubSub Accuracy4()' 122113 Drawing Accuracy setting, TEST ActiveSettings.CoordinateAccuracy = msdAccuracy4 CadInputQueue.SendKeyin "m,ms Set Accuracy 0.0001"End SubSub Accuracy5()' 122113 Drawing Accuracy setting, TEST ActiveSettings.CoordinateAccuracy = msdAccuracy5 CadInputQueue.SendKeyin "m,ms Set Accuracy 0.00001"End Sub
These all work but I still would like to know how to just do it via Key-in
point me to the answer if anyone knows Lorys mentioned basic but do not know really how to use the older basic anymore.
Version: MicroStation V8i SS 10
RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus
Unknown said:Lorys mentioned basic but do not know really how to use the older basic anymore
Keep it that way! Anything that BASIC could do, VBA does better. Don't let Lorys drag you into the quicksands of 20th century technology in 2018!
Regards, Jon Summers LA Solutions
What happens if you use the keyin
vba run ActiveSettings.CoordinateAccuracy=msdAccuracy3
?
Programs can be notoriously picky about the phrasing of things
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
Hi,
Unknown said:point me to the answer if anyone knows
I am surprised this question has returned again and again regardless correct key-in was mentioned already in this discussion and also wrong anwers were identified also.
As you mentioned and Jon Summers confirmed, to even think about BASIC today is completely wrong direction.
MaryB is pretty close to correct answer, but still one mistake has to be corrected.
Unknown said:I am not able to put ActiveSettings.CoordinateAccuracy = {number}
ActiveSettings.CoordinateAccuracy = {number}
Yes, because it's wrong.
The correct key-in is
vba execute ActiveSettings.CoordinateAccuracy = <constant>
for example
vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy5
Using VBA editor gives you list of all available constans:
Also Object Browser in VBA Editor can help to identify correct values:
Excuse me "dont let let Lorys Drag you?" that is a bit harsh... I believe in we should use ALL the tools available to you even basic!and if it gives you the key in your searching for well and good if not then try something else like vba recorder...I'll admit I have a personal preference for basic and may even be the wrong direction, because its what I know better as I'm a drafter and NOT a coder, but I'll let the personal slur go, this time, but lets not get personal even if we are passionate about what we do and say after all were all "brothers"in the mstn fraternity and are only here to help one another right?
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
Lorys said:Excuse me "dont let let Lorys Drag you?" that is a bit harsh...
Well, it probably is ... not sure as I am not a native speaker, so I am lost in tiny language details ... but in my opinion Jon is right in fact.
Lorys said:I believe in we should use ALL the tools available to you even basic!
No. Especially in the situation when the tool is released as obsolete (and as such not developed anymore) and better tool is available too.
MicroStation BASIC was replaced by MicroStation VBA when MicroStation V8.0 was released in 2001 (17 years ago) and marked as obsolete in V8 2004 Edition I guess (14 years ago). MicroStation BASIC history ended with CONNECT Edition more than 2 years ago, because it was removed from the product.
"Obsolete" means the tool is still avilable, but not developed further (and usually less supported) and no new project should be based on such tool. So to recommend BASIC after 14 years when Bentley have told "don't use it and migrate your macros to VBA" and this technology is effectively dead for more than 2 years is really as Jon wrote the navigating people to the quicksands of 20th century technology.
Lorys said:because its what I know better as I'm a drafter and NOT a coder
I don't see any relevance to be not programmer (e.g. drafter) and to prefer MicroStation BASIC. In fact I think it's even opposite: MicroStation BASIC as proprietary technology has limited documentation with really limited base of tutorials and examples. Contrary to it, VBA is broadly used tool, the same over all SW as Office etc, so there are hundreds of sources (book, tutorials, examples...) and to start with VBA is quite easy, because the learning curve can begin with Office VBA (because of the most tutorials) and later MicroStation VBA API can be added. Also tools (editor, object browser, debugger) are far better.
I am pretty sure also here in dicussion groups there are substantially more people knowing VBA than MicroStation BASIC.
Regards,
Your quite right Jan , but I only suggested to Richard offline to try Basic after he already tried everything else including vba to try to FIND A KEY IN COMMAND... and had exhausted all the other possibilities ie as last resort not a first resort... even though I told him to do a search here as I remember there was a vba execute keyin...
If your company doesn't pay for select support then contacts and this forum are pretty much your only way to find out how to do something...