Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Recommended Posts

We are having trouble with a portion of one of our VBScript in X4. It doesn't matter whether I am trying to SAVE or SAVEAS, it crashes in X4 but works great in X2. Is there a new syntax for this or is this a X4 bug?

 

Here is a sample program with the problem.

 

Call Main()

Sub Main()

 

Dim strMCname

strMCName = "C:mcamxZZTest-1.MCX"

 

'Next line works in X2 & X4

call SetCurrentFileName(strMCName)

 

'Next line works in X2, crashes in X4

call SaveMCAs(strMCName, True)

 

'I tried this instead but with same results

'Next line works in X2, crashes in X4

call SaveMC(True)

 

'Next line works x2, not in X4: Insufficient

'memory to perform operation

call openmc(strMCName)

 

End Sub

 

 

Anyone know what's going on?

Link to comment
Share on other sites

I have tried cycling out the bad electrons (Rebooting the computer) but that is not helping.

I have a very simple X4 program and am running the above VBScript directly from X4 and getting the problem. I did a comparison of the .dll's used in X2 vs. X4 and swapped a bunch out but that did not help either. It still crashes X4 when it get's to the "save" or "Saveas" line. Any other thoughts or directions I can look to help solve this?

Thanks

Link to comment
Share on other sites

Okay, this is going to sound a little crazy, but this is what I've found.

 

When I looked in C:mcamxapps (X4) I found a file called "MCVBScript.dll" (150KB). I copied over it with the X2 version of the same file (146KB). When I tried to launch my VBScript, I could not even get the VB window to pop up. I copied the X4 version (150KB - exactly the same file I started with) back into the the apps folder and ran my VBScript. It worked and continued to work until I shutdown and restarted Mastercam. At that point it went back to crashing mastercam.

I repeated the above steps and it is back to working again. Now I am really lost. Is this a MCX4 instillation problem or is there some switch somewhere I should toggle or ????????

Link to comment
Share on other sites

Randy,

 

"...and swapped a bunch out ..."

 

Moving the MCVBScript.DLL 'app' between X2 & X4 will cause nothing but trouble. Likewise for 99% of the DLLs in Apps, Chooks, ImportExport, and the Mastercam folder itself. These are built to match specific version of the program .EXE and .DLLs.

 

I don't think you're crazy, though.

 

We did find an unexpected case here when I built a C-Hook for X4 and it was crashing when trying to save. The problem was in Mastercam.EXE itself and not in the C-Hook. The same C-hook source code (rebuilt for each version of course) has been working since X2.

There's a fix in the upcoming Maintenance release. I'm not sure if it made it into Beta 1, though.

Link to comment
Share on other sites

I think I found the problem!!! Woo Hoo!

 

I copied my C:mcamx directory into another folder, removed X4 from my PC, deleted all the remaining files in C:mcamx and then reloaded X4. At that point my VBScript worked. I started loading in files from the previous X4 load that were not loaded in the new load. In C:mcamxchooks there is a set of 4 files called: AI_XMENU.dll, AI_XMENU.ft, AI_XMENU.txt & AI_XMENU_.ft.

As soon as I copied these into the new X4 the problem reappeared. I take them back out and the problem goes away. I have looked online to see if I could find out what they did but have not determined that yet. X4 seems to run okay without them so we will run this way for now.

 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...