Results 1 to 4 of 4

Thread: Macro Help

  1. #1
    Guest

    Macro Help

    This macro is supposed to read an element's level and increment it by
    known number. What is wrong with it?

    sub main()
    Dim element as New MBEElement
    Dim filepos as long
    filePos = element.fromFile (0)
    Do While filePos >= 0
    if element.isgraphics <> 0 Then
    element.level = mbeelement.level + 13
    stat = element.rewrite()
    End if
    filePos = element.fromFile(filePos + element.fileSize)
    Loop
    End sub

  2. #2
    Rob Guest
    Mark,

    If you are running the Basic Macro in v8 then look up the help files as the
    number is no called LevelCode or something like that...

    If in v7 I have made a small change

    sub main()
    Dim element as New MBEElement
    Dim filepos as long
    Dim lngLevel as Long
    filePos = element.fromFile (0)
    Do While filePos >= 0
    if element.isgraphics <> 0 Then
    ' ************* TRY THIS
    element.level = element.level + 13
    stat = element.rewrite()
    End if
    filePos = element.fromFile(filePos + element.fileSize)
    Loop
    End sub
    <Mark.Madsen@Bayercropscience.com> wrote in message
    news:1115647338.083429.224530@f14g2000cwb.googlegr oups.com...
    This macro is supposed to read an element's level and increment it by
    known number. What is wrong with it?

    sub main()
    Dim element as New MBEElement
    Dim filepos as long
    filePos = element.fromFile (0)
    Do While filePos >= 0
    if element.isgraphics <> 0 Then
    element.level = mbeelement.level + 13
    stat = element.rewrite()
    End if
    filePos = element.fromFile(filePos + element.fileSize)
    Loop
    End sub

  3. #3
    Guest
    To answer your question. I am running this in V8. Does anyone know
    what element.level translates to in V8 for this macro to work?

    Thanks

  4. #4
    Rob Guest
    ....LevelCode

    MbeElement.Level doesn't work as it did due to the change in level number
    structure.

    LevelCode replaces it to handle Long Integers

    Look in the MS Basic Help files under MBEElement and the functions
    underneath it or ask here... http://discussion.bentley.com/

    <Mark.Madsen@Bayercropscience.com> wrote in message
    news:1115733087.825296.117450@o13g2000cwo.googlegr oups.com...
    To answer your question. I am running this in V8. Does anyone know
    what element.level translates to in V8 for this macro to work?

    Thanks

Similar Threads

  1. Macro to rerun a macro
    By Wayne Tiffany in forum SolidWorks
    Replies: 5
    Last Post: 09-27-2005, 09:10 AM
  2. has anyone seen a macro that will do this?
    By Brian in forum SolidWorks
    Replies: 6
    Last Post: 08-04-2005, 09:10 AM
  3. Macro Help
    By in forum MicroStation
    Replies: 0
    Last Post: 05-02-2005, 09:10 AM
  4. Is there a macro out there that...
    By danferes in forum SolidWorks
    Replies: 0
    Last Post: 02-03-2005, 07:21 AM
  5. Is there a macro out there that...
    By BEN EADIE in forum SolidWorks
    Replies: 2
    Last Post: 02-02-2005, 05:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum