How can I select Lines?

Discussion in 'Microstation' started by AL-MARAGHI, Jul 13, 2004.

  1. AL-MARAGHI

    AL-MARAGHI Guest

    Hi,

    I have thousands of lines in hundreds of files are on different angle,
    and they are crossing each other.. (They are on same attributes).

    Is there any way to select the lines which are on a specific angle?
    Or can I do that with EDG?

    If yes how?

    Thanks in advance for any responds..
     
    AL-MARAGHI, Jul 13, 2004
    #1
  2. Al-Maraghi...

    you could use a microstation macro, this would be an easy way.

    something like:

    filepos=element.fromFile(0, 0)
    Do While filepos>=0
    select case element.Type
    case MBE_LINE
    if(TestAngleWithTolerance)
    DoSomeThing
    end select
    filepos=element.fromFile(filepos+element.fileSize, 0, true,
    true)
    loop
     
    Volker Huefner, Jul 14, 2004
    #2
  3. AL-MARAGHI

    AL-MARAGHI Guest

    Thanx Volker..

    But I have no any idea about macros creating.. only cut from some
    places & paste to collect a macro.

    But when I tried to do what you mentioned, it poped up with a massage
    says that: "Compilation failed at line 1. Syntax Error"
     
    AL-MARAGHI, Jul 14, 2004
    #3
  4. Al-Maraghi...

    this was not a complete macro, just a snipset, to give you an idea.

    Macros start with "sub main" and ends with "end sub", but this wound help
    you very much.

    the problem are the parts "TestAngleWithTolerance" were you have to build
    some code to detect the right elements, i.g. by angle. and the
    "DoSomeThing", were you must tell the macro, what you want to do with the
    element.

    Perhaps you find someone with an better idea in the official Bentley
    newsgroup at news.viecon.com

    Volker
     
    Volker Huefner, Jul 15, 2004
    #4
  5. AL-MARAGHI

    Lorys Lea Guest

    You could do this in V8 with the batch process.
    you get your macro first that selects by angle.. sorry not in my league.
    but then you tellit what you want to do with command line commands
    and then you just tell the batch processor which files you want to do this
    to and away it goes..
    In theory you should be able to get a macro to do what you want in V7 even
    if you pay a programmer then create a script file that would open all the
    files one at at time and perform the macro operation and close the file and
    procede to the next..
    try posting to bentley.microstation.v7.programming newsgroup
    at discussion.bentley.com
    select by using angle thats too hard for me!
     
    Lorys Lea, Jul 16, 2004
    #5
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.