APAR status
Closed as program error.
Error description
SelectElement2 crashing after using a Selection. Scenario: 1. Create Script1.catvbs script using the following: Sub CATMain() Dim oSel 'As Selection Set oSel = CATIA.ActiveDocument.Selection For i = 1 To oSel.Count MsgBox TypeName(oSel.Item(i).Value) Next End Sub 2. Create Script2.catvbs script using the following: Sub CATMain() Dim oDoc 'As DrawingDocument Dim oSel 'As Selection Set oDoc = CATIA.ActiveDocument Set oSel = oDoc.Selection ReDim InputObjectType(0): InputObjectType(0) = "DrawingText" oSel.Clear strStatus = oSel.SelectElement2 (InputObjectType, "Select text!", True) If (strStatus = "Cancel") Then Exit Sub ElseIf (strStatus = "Redo") Then 'Do Nothing ElseIf (strStatus = "Undo") Then Exit Sub Else If (strStatus <> "Redo") Then MsgBox oSel.Count MsgBox TypeName(oSel.Item (1).Value) End If End If End Sub 3. Create a new drawing 4. Create a text 5. Run Script2.catvbs 6. Select the text created at step 4: we get 2 msgbox, this is ok 7. Select the text created at step 4 8. Run Script1.catvbs : we get 1 msgbox, this is ok 9. Run Script2.catvbs 10. Select the text created at step 4: we get 2 msgbox, this is ok This proves that Script2.catvbs is working fine by itself. 11. Now close and restart CATIA 12. Create a new drawing 13. Create a text 14. Select the text created at step 13 15. Run Script1.catvbs : we get 1 msgbox, this is ok 16. Run Script2.catvbs 17. Select the text created at step 13 The script is crashing. .
Local fix
Problem summary
SelectElement2 crashing after using a Selection SelectElement2 crashing after using a Selection. Scenario: 1. Create Script1.catvbs script using the following: Sub CATMain() Dim oSel 'As Selection Set oSel = CATIA.ActiveDocument.Selection For i = 1 To oSel.Count MsgBox TypeName(oSel.Item(i).Value) Next End Sub 2. Create Script2.catvbs script using the following: Sub CATMain() Dim oDoc 'As DrawingDocument Dim oSel 'As Selection Set oDoc = CATIA.ActiveDocument Set oSel = oDoc.Selection ReDim InputObjectType(0): InputObjectType(0) = "DrawingText" oSel.Clear strStatus = oSel.SelectElement2 (InputObjectType, "Select text!", True) If (strStatus = "Cancel") Then Exit Sub ElseIf (strStatus = "Redo") Then 'Do Nothing ElseIf (strStatus = "Undo") Then Exit Sub Else If (strStatus <> "Redo") Then MsgBox oSel.Count MsgBox TypeName(oSel.Item (1).Value) End If End If End Sub 3. Create a new drawing 4. Create a text 5. Run Script2.catvbs 6. Select the text created at step 4: we get 2 msgbox, this is ok 7. Select the text created at step 4 8. Run Script1.catvbs : we get 1 msgbox, this is ok 9. Run Script2.catvbs 10. Select the text created at step 4: we get 2 msgbox, this is ok This proves that Script2.catvbs is working fine by itself. 11. Now close and restart CATIA 12. Create a new drawing 13. Create a text 14. Select the text created at step 13 15. Run Script1.catvbs : we get 1 msgbox, this is ok 16. Run Script2.catvbs 17. Select the text created at step 13 The script is crashing. .
Problem conclusion
THIS PROBLEM WILL BE FIXED ON CATIA VERSION 5 RELEASE 16 GA level. NOTE THAT THIS PROBLEM WILL ALSO BE FIXED ON V5R14SP07 AND V5R15SP02. .
Temporary fix
Comments
APAR Information
APAR number
HD39680
Reported component name
CATIA V5 NT>XP
Reported component ID
569151000
Reported release
514
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2005-05-17
Closed date
2005-06-06
Last modified date
2009-06-24
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
514
Fix information
Fixed component name
CATIA V5 NT>XP
Fixed component ID
569151000
Applicable component levels
R514 PSN SP51407
UP05/07/05 N 1000
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSVJ2K","label":"CATIA"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"514","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Document Information
Modified date:
24 June 2009