Need urgent help with a macro

Discussion in 'Microstation' started by m1918, Nov 15, 2003.

  1. m1918

    m1918 Guest

    I used to be able to create a macro by simply recording the steps in order to turn levels on/off on a reference file.
    Ever since we've upgraded to V8 (running in V7 mode), I can no longer run any of those macro or recreate them by
    recording. Can anyone show me what's needed or as an alternate command I can use in the macro that can produce the same
    result? Here's an example of one of the simple ones that no longer work for me.



    Sub main
    Dim startPoint As MbePoint
    Dim point As MbePoint

    MbeSendCommand "REFERENCE LEVELS OFF 1-63"

    MbeSendDataPoint point, 1%

    MbeSendCommand "REFERENCE LEVELS 1-3,7-8"

    MbeSendDataPoint point, 1%
    End Sub



    Any help or suggestions would be greatly appreciated. Thanks in advance.

    George
     
    m1918, Nov 15, 2003
    #1
  2. m1918

    Dave Preston Guest

    The keyins are essentially as previous versions but V8 uses level names, not
    numbers. Unfortunately this does not allow level ranges to be used like 1-3
    as it would not make sense with names. It does allow wildcards "*" though
    for both level and reference file names:-

    reference level of level name(s) reference file name(s) e.g.:-

    reference levels of * *;selview 1
    reference levels on level 1, level 2, level 3 *;selview 1;reset

    The ";reset" unhighlights the reference file if you have this option on

    Incidentally, I don't see how your macro worked as it doesn't state which
    reference file(s) to turn the leves off in

    --

    Regards
    Dave Preston


    to turn levels on/off on a reference file.
    any of those macro or recreate them by
    can use in the macro that can produce the same
     
    Dave Preston, Nov 16, 2003
    #2
  3. m1918

    m1918 Guest

    First of all I'd like to thank you for your suggestions. Well it used to work when I had "Level Display" opened first,
    then I would select the reference file I wanted to have levels turn on/off. Then I used run the macro..... I couldn't
    have add the reference file name as part of the macro as this could involve any one of the thousands of file that I
    might have attached as a reference file.
     
    m1918, Nov 17, 2003
    #3
  4. m1918

    Dave Preston Guest

    Are you saying that what I gave you works or doesn't?

    --

    Regards
    Dave Preston


    work when I had "Level Display" opened first,
    on/off. Then I used run the macro..... I couldn't
    involve any one of the thousands of file that I
     
    Dave Preston, Nov 17, 2003
    #4
  5. m1918

    Lorys Guest

    I tried both what you and Dave said and I 've come up with a work around
    change your macro line
    MbeSendDataPoint point, 1%
    to
    MbeSendCommand "Selview 1"
    key in show ref
    select the ref file in question and have the hilite option on

    run your macro and it will turn off desired levels..
    BTW
    I wish we could use filters to make standard settings of what levels should
    be on or off...
    within ref files

    work when I had "Level Display" opened first,
    on/off. Then I used run the macro..... I couldn't
    involve any one of the thousands of file that I
     
    Lorys, Nov 17, 2003
    #5
  6. m1918

    m1918 Guest

    After trying a combination of suggestions from a number of sources, I've managed to get it working exactly the way I
    wanted. Thank you for all your help.

    George
     
    m1918, Nov 19, 2003
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.