IBM Support

HD33258: INITIALIZE FAILS WHEN CALLING CATVBA FROM CATSCRIPT OR CATVBS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as Permanent restriction.

Error description

  • Initialize fails when calling a catvba from a catscript
    or a catvbs (using ExecuteScript of SystemService).
    Scenario:
    The first time that a catvba is called by a catscript
    or catvbs in a
    CATIA V5 session, Initialize method for vba user
    forms fails.
    Scenario:
    - Copy the following files in D:\Temp folder
    o PMR.CATScript
    o PMR.catvba
    o PMR.catvbs
    If D:\Temp is not available, copy the files to an
    another location and
    modify the following line in the catscript and catvbs
    with the
    appropriate path:
    call CATIA.SystemService.ExecuteScript
    ("D:\Temp\PMR.catvba",CatScriptLibrary
    TypeVBAProject,"PMR1","CATMain",params)
    1 -> Catvba by itself
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Macro library
    - Select VBA projects
    - Add existing library...
    - Browse for D:\temp\PMR.catvba
    - close
    - Select PMR1
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, you should see this:
    see attached doc
    There is no problem
    2 -> Catvba called by CATScript
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Select
    - Browse for D:\temp\PMR.CATScript
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, nothing happens.
    There is a problem.
    Note that the next time you launch the CATScript
    there is no problem
    (until you restart CATIA).
    3 -> Catvba called by CATvbs
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Select
    - Browse for D:\temp\PMR. catvbs
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, nothing happens.
    There is a problem.
    Note that the next time you launch the catvbs there
    is no problem
    (until you restart CATIA).
    Expected behaviour: Initialize method should
    always work.
    .
    

Local fix

Problem summary

  • Initialize fails when calling catvba from catscript or catvbs
    Initialize fails when calling a catvba from a catscript
    or a catvbs (using ExecuteScript of SystemService).
    Scenario:
    The first time that a catvba is called by a catscript
    or catvbs in a
    CATIA V5 session, Initialize method for vba user
    forms fails.
    Scenario:
    - Copy the following files in D:\Temp folder
    o PMR.CATScript
    o PMR.catvba
    o PMR.catvbs
    If D:\Temp is not available, copy the files to an
    another location and
    modify the following line in the catscript and catvbs
    with the
    appropriate path:
    call CATIA.SystemService.ExecuteScript
    ("D:\Temp\PMR.catvba",CatScriptLibrary
    TypeVBAProject,"PMR1","CATMain",params)
    1 -> Catvba by itself
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Macro library
    - Select VBA projects
    - Add existing library...
    - Browse for D:\temp\PMR.catvba
    - close
    - Select PMR1
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, you should see this:
    see attached doc
    There is no problem
    2 -> Catvba called by CATScript
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Select
    - Browse for D:\temp\PMR.CATScript
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, nothing happens.
    There is a problem.
    Note that the next time you launch the CATScript
    there is no problem
    (until you restart CATIA).
    3 -> Catvba called by CATvbs
    - Start CATIA (make sure to clear your
    CATSettings prior)
    - Tools/Macro/Macros Select
    - Browse for D:\temp\PMR. catvbs
    - Click Run
    You should see the following panel:
    see attached doc
    If you click on the button, nothing happens.
    There is a problem.
    Note that the next time you launch the catvbs there
    is no problem
    (until you restart CATIA).
    Expected behaviour: Initialize method should
    always work.
    .
    

Problem conclusion

  • THIS PROBLEM IS PERMANENT RESTRICTION IN
    CATIA.
    Incident Diagnosis :
    A VBA Form launched from a VBSCript macro
    through the CATIA.SystemService.ExecuteScript
    method does not raise events the first time is is
    executed (the buttons do not respond). This
    scenario works OK on the next replays.
    Restriction Explanation  :
    The Microsoft VBA code seems to have a problem
    in initialiazing the VBA events handler when we are
    in the VBScript thread. As this problem is specific
    to the Microsoft code, we cannot find a solution a
    have to close this issue Permanent Restriction.
    By-Pass :
    A bypass consists in writing a VBA macro instead of
    a VBScript macro to do the
    CATIA.SystemService.ExecuteScript method call.
    As this scenario already uses a VBA form
    (which is not supported on Unix), this is useless
    using VBScript and using VBA would
    be more coherent.
    .
    

Temporary fix

Comments

APAR Information

  • APAR number

    HD33258

  • Reported component name

    CATIA V5 NT>XP

  • Reported component ID

    569151000

  • Reported release

    514

  • Status

    CLOSED PRS

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2005-01-07

  • Closed date

    2005-01-25

  • Last modified date

    2005-01-25

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJ2K","label":"CATIA V5"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"514","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
25 January 2005