Key-in string to select elements outside of the fence

Hello!

I am creating batch file to perform the following on each sheet file:

1: select plot frame from the reference file ( courtesy one of the threads on this forum)

# loading selectionby for one of the selection options#

load mdl selectby

place fence fromshape;

level element select file:referencefile.dgn framelevel

#trying several options without success in order to initiate choice of the element here#

choose selection

dx=0,0

selview 1

point ab

dl=0,0

selectionby execute

none of the options above create "left-click" effect that would place fence around my selected shape ( which is a single rectangle placed on specific level for the purpose of plotting)

After selecting this shape (manually at this point) I actually need to set fence mode to "VOID", as I would like to delete everything that is selected OUTSIDE of the frame

so, I cannot find the fence mode key-in that would switch fence selection to "void"

reason for above manipulations is, that I am trying to select and delete all tag sets that were double-and triple-placed, and to leave only one that is within the plotting frame. the other method of selection ( by "selectby") would not work in this case , as these tagsets are completely identical, and I will not be able to separate them by properties.

Thank you!

------------------------------

using: AECOSIM Buiding Designer V8i (Select Series 6)

Version 08.11.09.866

Parents Reply Children
  • Lorys, 

    this is what the macro shows:

    -----------------------------------------

    Sub main
    Dim startPoint As MbePoint
    Dim point As MbePoint, point2 As MbePoint

    ' Start a command
    MbeSendCommand "PLACE FENCE ICON "

    ' Set a variable associated with a dialog box
    MbeSetAppVariable "", "tcb->msToolSettings.fence.placeMode", 3&

    MbeSendCommand "PLACE FENCE ICON "

    MbeSendCommand "LOCK FENCE VOID OUTSIDE "

    ' Coordinates are in master units
    startPoint.x = -126.675673#
    startPoint.y = 545.974555#
    startPoint.z = 5.334672#

    ' Send a data point to the current command
    point.x = startPoint.x
    point.y = startPoint.y
    point.z = startPoint.z
    MbeSendDataPoint point, 1%

    point.x = startPoint.x - 61.444942#
    point.y = startPoint.y - 76.834425#
    point.z = startPoint.z
    MbeSendDataPoint point, 1%
    End Sub

    --------------------------------------

    that would mean, that in order to pick a shape, microstation is actually fetching vertices of that shape from the selection, and then sending them to form the fence.

    that would be something VBA would do, but not a macro.

    Speaking of VBA's, I understand these are not a desirable way of programming automation from this point on for 2 reasons:

    1: they cannot be evoked from Projectwise cloud ( unlike .txt batch files)

    2: they are being phased out by Bentley in all Open technology ( that is a responce from Bentley Support on my inquiry re: VBA's possible hosting on PW)

    so, I think  I will try to select text within the print area somehow else.

    Thank you for suggestion !

  • Dim startPoint As MbePoint

    That's a BASIC macro, not VBA.  Prefer VBA to BASIC.

    VBA's possible hosting on PW

    I'm not sure what that means.  VBA is part of MicroStation.  A VBA macro is hosted by MicroStation, meaning that it runs in MicroStation's address space on the same processor. 

    ProjectWise can't host a MicroStation VBA macro because (a) it's a different process probably on a remote computer and (b) it's not MicroStation.

    Since you're working with the V8i generation it's moot whether VBA is 'desirable' — it's there for you to use now, and it remains in the CONNECT generation.

     
    Regards, Jon Summers
    LA Solutions

  • ProjectWise can't host a VBA macro because it's a different process probably on a remote computer.

    hey Jon, a little off topic but  how can i  make a vba macro run under PW?

    Surely there must  be a way

    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 

  • how can i  make a vba macro run under PW?

    Yes, it is off-topic.  A better place to post that question might be the Content Management Forum.

    You should clarify whether you mean 'make a VBA macro run on MicroStation under PW' or 'make a VBA macro run on PW'.

     
    Regards, Jon Summers
    LA Solutions

  • ou should clarify whether you mean 'make a VBA macro run on MicroStation under PW' or 'make a VBA macro run on

    yes I meant make a vba run on mstn  under Pwise

    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