AnsweredAssumed Answered

OnCellModifyConfirmation Event error

Question asked by lab409 on May 7, 2017
Latest reply on May 14, 2017 by 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?

Outcomes