Hilite Key-in and VBA Stopped workiing

Micristation took a crash after which my Key-in scripts  for setting the design file color quit working, both the VBA and Key-in's  I  think it is an MDL file needs loading

but unable to figure it out.

Examples of what did work:

1:25 PM 10/7/2018 Hili Colors

Settings>Design File>Color

after Microstation crash:

CadInputQueue.SendCommand "set hilite gray;mdl keyin calculat calc tcb->selectionHiliteColor=8"

would not work nor did manual Key-in commands

mdl keyin calculat calc tcb->selectionHiliteColor=5
mdl keyin calculat calc tcb->selectionHiliteOverride=5

before the crash, I realize it is both VBA example and Key-in thought it might help someone help me. Thank You

Parents
  • CadInputQueue.SendCommand "set hilite ..." would not work nor did manual Key-in commands

    If manual key-ins don't work then it's unreasonable to expect VBA to work.

    First, find the reason why manual key-ins don't work.  Did a MicroStation restart solve anything?

    I  think it is an MDL file needs loading

    The only required app. is the MicroStation calculator (mdl load calculat).

     
    Regards, Jon Summers
    LA Solutions

  • So appreciate the time, I cold not find it in  my  mdlapps folder, so I went to asneed and found it there, copied to the mdlapps and then it became a load option. I then loaded. Again thank you so much Jon, you have helped me a number of times.

    Version: MicroStation V8i SS 10

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

  • Hi Richard,

    I cold not find it in  my  mdlapps folder, so I went to asneed and found it there, copied to the mdlapps and then it became a load option. I then loaded.

    this is completely wrong solution and approach! You are corrupting MicroStation installation, which in long term perspective is for sure not a way how to customize MicroStation. Jon did not write anything like "move MicroStation files", so why did you so?

    Jon's advice was: First, find the reason why manual key-ins don't work. calculat application is placed at \MicroStation\mdlsys\asneeded\ and should never by moved or copied to another location. It works fine, calculat application is loaded automatically when key-in "mdl keyin calculat" is used, so there is no single reason to change anything and to corrupt your MicroStation installation.

    would not work nor did manual Key-in commands mdl keyin calculat calc tcb->selectionHiliteColor=5 mdl keyin calculat calc tcb->selectionHiliteOverride=5

    It seems you do not understand correctly what the commands do and how to use them:

    • selectionHiliteOverride is variable defining whether selection and hilite values can be different. It's boolean variable and can be set 0 or 1, not to another value! When using calculat to modify tcb, you are directly modifying internal MicroStation binary structures, so you have to know exactly what values can be used, otherwise you can crash MicroStation easily.
    • selectionHiliteOverride has to be set before a color itself, otherwise it has no effect.
    I realize it is both VBA example and Key-in thought it might help someone help me.

    There is no difference when key-in is sent by a user from command line or by VBA application. BTW you are not sending key-in, but command, which is something slightly different. Are you aware of a difference between .SendKeyin and .SendCommand methods? In the most situations they are pretty the same, but not always.

    I think the right key-in, that will work both from command line and VBA, is:

    set hilite red;mdl keyin calculat calc tcb->selectionHiliteOverride=1;mdl keyin calculat calc tcb->selectionHiliteColor=6

    With regards,

      Jan

  • So appreciate helps, I get the VBA information or  doing most things via the great tool VBA Record, I do not know how to write any onlly copy and paste. Thank you Jan & Jon. I do not know the difference between command vs Keyin other than you can do the key-ins direct with the  Key-in tool and by adding scripts at times. I have copied the above and do appreciate.

    Version: MicroStation V8i SS 10

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

  • Jan, thanks for the help I can just delete the copy I made to enable the menu to show me  calculat ops that is me. Thanks again

    Version: MicroStation V8i SS 10

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

  • Yes, Sir just what the dr ordered. I have now added the key-in command "mdl keyin calculat" and the file is in the as need thanks to Jon's correction. 

    Version: MicroStation V8i SS 10

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

Reply Children
No Data