1 Reply Latest reply on May 14, 2017 1:02 PM by lab409

    OnCellModifyConfirmation Event error

    lab409

      I try to automate cell creation in Cell Editor, Xpedition VX 2.1

       

      I check samples and community cases and wrote some code:

       

      Sub CreateConnectorCell(ByRef cellPartition, ByRef partObj)
          'Create NewCell Object
          Dim newCell
          Set newCell = cellPartition.NewCell(ecelldbCellTypePackage)
          ...
          'Set Cell's properties
          ...
          'Commit new Cell
          newCell.Commit
          ...
          'Create Cell Editor Document
          Dim cellEditorDoc 
          Set cellEditorDoc = newCell.Edit 
          'Attach Events
          Call Scripting.AttachEvents( cellEditorDoc, "cedocument" )
          Call Scripting.AttachEvents( cellEditorDoc, "cedocument2" )
           ...
          'Finish placing object in cell and ready to save
          cellEditorDoc.Save    
          cellEditorDoc.Close( True )
          Set cellEditorDoc = Nothing
      End Sub
      
      Function cedocument_OnCellModifyConfirmation( reason, description )
          If reason = epcbCellModifyConfirmationQuery_NoPinsPlaced_OkCancel Then
              cedocument_OnCellModifyConfirmation = epcbCellModifyConfirmationAnswer_Yes
          End If
      End Function
      
      Function cedocument2_OnCellModifyConfirmation( reason, description )
          If reason = epcbCellModifyConfirmationQuery_NoPinsPlaced_OkCancel Then
              cedocument2_OnCellModifyConfirmation = epcbCellModifyConfirmationAnswer_Ok
          End If
      End Function
      

       

      I have needed events according to documentation on InfoHub (Automation Reference) but anyway I get following error whe calling cellEditorDoc.Save:

      Error:0x800402f4  'When executing this operation a condition requiring user input was encountered. Please supply a handler for the OnCellModifyConfirmation event so that you can provide it.'

       

      So I have question - what I have to do for fix it?

        • 1. Re: OnCellModifyConfirmation Event error
          lab409

          I solved this.

          This error doesn't relate to cellEditorDoc.Save Event Handlers

          This error invoke because there are a errors in the cell (incorrect pin count and placed pins, incorrect count of overall pins and so on). In this case Cell Editor invoke error mesagge such this:

          error.png

          Because there is no needed Event Handler for this errror invokes following exception:

          cellEditorDoc.Save:

          Error:0x800402f4  'When executing this operation a condition requiring user input was encountered. Please supply a handler for the OnCellModifyConfirmation event so that you can provide it.'

           

          P.S. cellEditorDoc.Save andcellEditorDoc.Close(True) may be used without attached events and in this situation it will not invoke any exceptions or errors

          1 of 1 people found this helpful