Star benchmark doesn't run

Discussion in 'SolidWorks' started by Marc Gibeault, Aug 9, 2005.

  1. Hi all, especially Kellknerp I guess...
    I'm slowly benchmarking all our workstations here and one is giving me
    some trouble. It's on WinXP pro sp2 and SW 2005 SP2.
    I edited the macro so its got the right references, I enter a valid
    path, enter 5 as the number of iterations and hit ok and then I get:
    "Run-time error '13': Type mismatch"
    The macro editor opens and the folowing line is highlighted:
    "CheckRelease = CLng (..."
    Any thoughts?

    Thanks,

    -Marc
     
    Marc Gibeault, Aug 9, 2005
    #1
  2. Marc Gibeault

    TOP Guest

    Happens all the time. It isn't a bug. Place the cursor in the main()
    subrouting and hit F5. The macro and macros in general start in the
    routine the cursor is in. If it isn't main() you are likely to have
    problems.
     
    TOP, Aug 9, 2005
    #2
  3. Marc Gibeault

    TOP Guest

    Sounds like FORTH. main() will be the first to run if the macro is run
    as a macro and not in the editor IIRC.
     
    TOP, Aug 10, 2005
    #3
  4. Hi,

    I still get the error.
    I go to the main section and hit F5, it asks for the path and the
    number of iterations and then returns "Run-time error 13: type mismatch"
    If I hit Debug it highlights the line
    CheckRelease = CLng(Left(swApp.RevisionNumber(),
    InStr(swApp.RevisionNumber(), ".")))

    Thanks,

    -Marc
     
    Marc Gibeault, Aug 10, 2005
    #4
  5. Marc Gibeault

    TOP Guest

    The whole function is:

    Function CheckRelease() As Long

    CheckRelease = CLng(Left(swApp.RevisionNumber(),
    InStr(swApp.RevisionNumber(), ".")))

    End Function

    The only reason I can think of is casting the expression in parentheses
    didn't work. If you put this line before the offending line it will
    report the revision number in the immediate window. What do you get?

    Debug.Print swApp.RevisionNumber
     
    TOP, Aug 10, 2005
    #5
  6. It doesn't work.
    It doesn't display the revision number and I get the same error and the
    same line highlighted when I click on Debug.

    -Marc
     
    Marc Gibeault, Aug 10, 2005
    #6
  7. Marc Gibeault

    TOP Guest

    Can you do 2+2 in a SW dimension? I am not being funny. You may have a
    VB problem. If the immediate window doesn't show something like 12.5.0
    there is either a SW problem or a VB problem. You did have the
    immediate window showing didn't you?
     
    TOP, Aug 10, 2005
    #7
  8. I checked to be sure and yes, equations do work.
    And I didn't see the immediate window...

    Thanks

    -Marc
     
    Marc Gibeault, Aug 10, 2005
    #8
  9. Marc Gibeault

    TOP Guest

    In the macro editor go to the view menu and turn on the immediate
    window. Then run it and see what appears there.
     
    TOP, Aug 10, 2005
    #9
  10. Ok, the immediate window is showing and it says 13.2.0

    -Marc
     
    Marc Gibeault, Aug 10, 2005
    #10
  11. Marc Gibeault

    TOP Guest

    In the view menu you can turn on the immediate window.
     
    TOP, Aug 10, 2005
    #11
  12. Yep I see it, it's 13.2.0

    -Marc
     
    Marc Gibeault, Aug 10, 2005
    #12
  13. Marc Gibeault

    TOP Guest

    I got it to misbehave. I moved the whole main() subroutine to the end
    and it then worked. It also worked regardless if I started it as a
    macro and didn't try to run it from the editor. The fact that you got
    it to report the version suggests that it ran that time. Is that true?
     
    TOP, Aug 11, 2005
    #13
  14. Marc Gibeault

    P. Guest

    FORTH was very fast and even had some processors built to take advantage of
    how its stack based methods. The basic idea was to have a stack like an HP
    calculator and then define words that put things on and off the stack and
    that were defined from other words. The oddity was that you ended up
    defining what would amount to the program you had to have all the words it
    used defined first. If you have ever programmed an HP you can catch
    glimpses of it.
     
    P., Aug 11, 2005
    #14
  15. No, it's always the same behavior; I enter the path and the number of
    iterations and then there the 'type mismatch error'
    A part document gets created but there is no features.
    I tried to move the main section at the end, still the same.
    Would it help if I put some screen grabs on a web site?

    -Marc
     
    Marc Gibeault, Aug 11, 2005
    #15
  16. Marc Gibeault

    TOP Guest

    Search the code for:

    Select Case CheckRelease()

    To the left of this line in the vertical grey bar on the side of the
    window left click once. A brown dot should appear. Not hit F5. You
    should be asked to fill in the two user inputs before the code stops on
    that line.
     
    TOP, Aug 11, 2005
    #16
  17. Yep, that's working ok so far.
     
    Marc Gibeault, Aug 11, 2005
    #17
  18. Marc Gibeault

    TOP Guest

    now press F8 repeatedly and see if it gets past the CheckRelease
    function.
     
    TOP, Aug 11, 2005
    #18
  19. It goes up to the same offending line
    CheckRelease = CLng(Left(swApp.RevisionNumber(),
    InStr(swApp.RevisionNumber(), "."))
    and then shows the 'type mismatch error' message as usual.
     
    Marc Gibeault, Aug 11, 2005
    #19
  20. Marc Gibeault

    TOP Guest

    Now press F8 repeatedly till past the End Function line.
     
    TOP, Aug 11, 2005
    #20
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.