Key-in: Working Units > Accuracy

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]

Parents
  • 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 1988
    SS4 - i7-3.45Ghz-16 Gb-250/1Tb/1Tb-Win8.1-64b

    Eric D. Milberger
    Architect + Master Planner + BIM

    Senior  Master Planner NASA - Marshall Space Flight Center

    The 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:

    • ActiveSetting is an object, as is deduced from its name,  which in MicroStation VBA API contains all MicroStation active settings.
    • .CoordinateAccuracy is setting of (suprise, isn't it? :-)) the coordinate accuracy settings.
    • The last part = msdAccuracyHalf is assignment, which set the new value of Coordinate Accuracy.

    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

    You have to use names, exactly as defined in MicroStation VBA documentation:

    vba execute ActiveSettings.CoordinateAccuracy = msdAccuracyHalf
    vba execute ActiveSettings.CoordinateAccuracy = msdAccuracy0
    vba 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

  • 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 

  • 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.

    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.

    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,

      Jan

  • 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...

    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 

  • Jan So sorry , I lost where this question was, I just found your link earlier, very sorry and  I think Number is sorta like  <Constant> ?

    I am coping your answers into a text file before going off, I over looked the lets you look below, so I never saw any of these replays

    just saw the one from Lorys. A really great, patient, helpful person on here. I read a lot of his kindness to many on here.

    He seems to put his heart into helping others as a number of you all do too!! Keep on helping us old slow guys with diminishing minds and bodies. I just book marked this now, could not find my way back till Jan helped me out. please believe I do like simple

    God Bless all for being kind and helpful

    Version: MicroStation V8i SS 10

    RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus

  • Thank you made a copy, did not know of the Object Browser. I have clipped a number of Goggle searches with replies from L.A. Solutions. He is very knowledgeable also. Well now aproaching 4:00 am, gotta quit. Many thanks to anyone willing to assist.

    Version: MicroStation V8i SS 10

    RJB Phillips III (Richard) Praise the Lord for His Mercy and grace in Christ Jesus

Reply Children
No Data