May 27

    32 bit Catia vbscripts on a 64 bit machine

    Bob Tresider
    [GKN Aerospace]
    We've recently converted to 64 bit machines; but, are running 32 bit catia V5 R18. I've found a problem with running catia vbscripts that worked fine on the old machines. They seem to die at the simple math function after an 'InputBox'.
    Here's one I put together to test.

    Sub CATMain()
    xx= Inputbox ("Start number if not 1",,1)
    yy =xx- 5
    msgbox yy
    End Sub

    It dies at the  ' yy =xx- 5' line with this message:
    CNEXT - CATScriptErrorMessages - ScriptingERR_1002 Execute the script "Macro1.catvbs".
    The scripting engine for MS VBScript has reported the following error: Source: Microsoft VBScript runtime error
    Description: Overflow Line: 4 Column: 0
    See the language reference guide or the V5 Automation APIs documentation. 
    It seems to relate to the inputbox result because:

    Sub CATMain()
     xx = 10
    yy = xx -5
    msgbox yy
    End Sub

    Works fine when the inputbox is replaced by a simple variable assignment.
    Any ideas?????
    Tomislav Solina
    try to check if your input is a number

    If isNumeric(xx) Then...
    Bob Tresider
    [GKN Aerospace]

    Yes, the value is returning as numeric. I'm guessing it has something to do with the 32 bit catia running on 64 bit machine; since, it works fine on the 32 bit machines. I'm hoping there is some fix.

    Bob Tresider
    [GKN Aerospace]


    I've discovered by trial-and-error that a one or both of a couple of user CATSettings, specifically 'part.CATSettings' and 'PartDocument.CATSettings', seem to be the problem with this issue. I narrowed it down to removing those from the user CATSettings file, and the script works. The problem came up again and I found that those CATSettings were generated again for some reason. I have to be very attentive when adjusting the Tools>Options to see what causes those to generate. I still have to try to determine if it is both or one CATSetting that is causing the script problem. It does the same thing with other users as well.

    Xavier Klein
    I do not have experience with VBSCRIPT , because most of the time I use VB 6.0 or VBA
    but with VBA I have also get similar trouble , run a very very basic code , get an error on the first line with any command like Msgbox "Hello world"
    In my case with VB or VBA , usually my problem is there is a missing reference
    exemple : I create a Macro on a PC , I select a specific Reference ( Tools / Reference / Microsoft Excel 10.0 ) , run the macro : OK
    I execute this Macro on an other PC , where this Module is not installed (Tools / Reference => MISSING Excel 10.0 because Excel 12.0 is set-up )
    run the macro , get error immediately on the first line , even if this first line is MsgBox .

    All Times America/New_York

    Copyright © 2016 COE. All Rights Reserved
    800-COE-CALL - 330 N. Wabash Ave, Suite 2000 - Chicago, IL 60611 USA
    All material, files, logos and trademarks within this site are properties of their respective organizations.
    Terms of Service - Privacy Policy - Contact