IBM Support

HD01922: VBA: IF "USER DEFINE VARIABLE" IS DEFINED IN CATMAIN(), IT DOESN'T WORK.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Scenario:
    1. Sel Tools - Macro - Macros
    2. Click "Macro libraries" and select VBA project in
    pulldown menu.
    3. Click "Create new library" button in Macro libraries
    window
    4. Click "OK" button in Create a new VBA project window
    5. Click "Close" button in Macro libraries window
    6. Click "Create" button in Macros window
    7. Set  "Macro language" -> MS VBA
            "Macro name" -> Sample1
       Click "OK" button in Create a new macro window
    8. Click "Edit" button in Macros window
       -->MS VBE Start
       (supress the 2 lines in editor)
    9. Copy contents of Sample1.txt in VB Editor.
    10. Sel Run - Run Sub/UserForm
        --> Macro Start
            First Message Box is displayed as follows.
            "CATIA Macro main EXECUTE"
            Click "OK" button
            Second Message Box is displayed as follows.
            "CATIA Macro sub EXECUTE"
            Click "OK" button
        ==> Macro normal end.
    11. Sel File - Close and Return to CATIA V5
    12. Sel Tools - Macro - Macros
    13. Click "Run" button in Macros window
        --> Macro Start
    PROBLEM ==> No message box is displayed.
    .
    NOTE:
    If "Sample2.txt" is used, this problem does not occur.
    

Local fix

Problem summary

  • VBA: IF USER DEFINE VARIABLE IS DEFINED IN CATMAIN(), IT
    DOESN'T WORK.
    

Problem conclusion

  • THIS PROBLEM WILL BE FIXED ON
      CATIA VERSION 5 RELEASE 11 GA level.
    
     INCIDENT DIAGNOSIS:
    There was a VBA bug in IVBAProcs::BindProcDisp that returned
    a wrong IDispatch.
    This IDispatch launches a native exception on GetRefTypeInfo
    for VBA types defined by Type ... End Type.
    
     TECHNICAL EXPLANATION FOR THE CORRECTION:
    The incorrect bloc is inserted in a try catch.
    
     ANSWER AND POSSIBLE BY-PASS:
    None.
    

Temporary fix

Comments

APAR Information

  • APAR number

    HD01922

  • Reported component name

    CATIA V5/NT/200

  • Reported component ID

    569151000

  • Reported release

    509

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2002-12-11

  • Closed date

    2003-02-06

  • Last modified date

    2003-02-06

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

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

Modules/Macros

  •    FILE
    

Fix information

  • Fixed component name

    CATIA V5/NT/200

  • Fixed component ID

    569151000

Applicable component levels

  • R509 PSN

       UP

  • R510 PSN

       UP

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

Document Information

Modified date:
06 February 2003