Star benchmark doesn't run

Aug 09, 2005 34 Replies

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


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.

Years ago I remember reading that Sub Main() needs to be the last sub in the macro in order to be sure that it was the first run. It makes no sense, but that's what I remember.

Sounds like FORTH. main() will be the first to run if the macro is run as a macro and not in the editor IIRC.

FORTH... I had forgotten that existed. I only know enough about it to barely remember it was a language when you mentioned it.

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

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

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

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?

I checked to be sure and yes, equations do work. And I didn't see the immediate window...

Thanks

-Marc

In the macro editor go to the view menu and turn on the immediate window. Then run it and see what appears there.

Ok, the immediate window is showing and it says 13.2.0

-Marc

In the view menu you can turn on the immediate window.

Yep I see it, it's 13.2.0

-Marc

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?

Interesting. I like the RPN on my HP, but I never got into programming it. I figured that if I was going to program something, I'd rather do it on the PC where I can more easily do something with the output.

All the various languages that have been invented are quite fascinating. I remember learning AutoLISP back in those days. Everything seemed backwards until one day I got it, and it seemed efficient.

Unfortunately, I've never become proficient in any of the languages I've been exposed to.

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

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.

Yep, that's working ok so far.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required