Programming Macro's

Discussion in 'Microstation' started by PB in Cuijk, Dec 10, 2003.

  1. PB in Cuijk

    PB in Cuijk Guest

    I'm programming a Macro.
    I want the macro to scan the DGN for attached reference files. The
    Logical Name off each reference file should become a string in the macro!

    How can I do this.

    Thanks,

    Peter
     
    PB in Cuijk, Dec 10, 2003
    #1
  2. PB in Cuijk

    Lorys Guest

    Check snutar there was a macro to do this and export output to asci..
    there is a sort of example in your macro examples directory .. if not there
    try the bentley website...
     
    Lorys, Dec 10, 2003
    #2
  3. PB in Cuijk

    Who Me? Guest

    v7 or v8?

    --
    perl -e '$_ = "macart\@No_Ozemail.SPAM.com.au\n"; s/NO\.//; s/SPAM\.//;
    print;'
    | I'm programming a Macro.
    | I want the macro to scan the DGN for attached reference files. The
    | Logical Name off each reference file should become a string in the macro!
    |
    | How can I do this.
    |
    | Thanks,
    |
    | Peter
     
    Who Me?, Dec 10, 2003
    #3
  4. PB in Cuijk

    Lorys Guest

    If I remember correctly its the one I use at work and it works in both
    versions...
    It may even be the one that was at cad gurus nolonger online...
    if no luck at snuttars reply here and i'll brink it home from work and post
    it here...
    sorry but I haven't got a copy here...at home...
     
    Lorys, Dec 12, 2003
    #4
  5. PB in Cuijk

    Who Me? Guest

    v7 is easier than v8...
    so what do you want to do with the names?
    here's a start..
    it puts all the names, descriptions and filenames into seperate arrays..
    Option Base 1

    Sub Main
    Dim refFile as MbeRefFile

    Dim refName() As String
    Dim refDescription() As String
    Dim refFileName() As String

    maxRefFiles = MbeRefFiles.maxRefFiles

    If maxRefFiles > 0 Then
    ReDim refName(maxRefFiles)
    ReDim refDescription(maxRefFiles)
    ReDim refFileName(maxRefFiles)

    For alpha = 1 to MaxRefFiles
    If MbeRefFiles(alpha).active <> 0 And MbeRefFiles(alpha).fileName <> ""
    Then

    refName(alpha) = refFile.attachName
    refDescription(alpha) = refFile.description
    refFileName(alpha) = refFile.description
    End If
    Next alpha
    End If

    MbeStartDefaultCommand

    End Sub
    --
    perl -e '$_ = "macart\@No_Ozemail.SPAM.com.au\n"; s/NO\.//; s/SPAM\.//;
    print;'
    | I'm programming a Macro.
    | I want the macro to scan the DGN for attached reference files. The
    | Logical Name off each reference file should become a string in the macro!
    |
    | How can I do this.
    |
    | Thanks,
    |
    | Peter
     
    Who Me?, Dec 13, 2003
    #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.