EBDN - Community - Question & Answers

  Monday, 07 May 2018
  2 Replies
  1.6K Visits
0
Votes
Undo
Hello,

I want to delete a symbol by using sheet operations in c#. The operation is executed without an error but the symbol is not deleting :(

Code:


public static void DeleteSymbol(ObjectItem oSymbol, Sheet oSheet)
{
ExecuteSheetRecordData[] atSheetOperation = new ExecuteSheetRecordData[2];

Globals.Application.IsVisible = true;
atSheetOperation[0].Qualifier = (int)ExecuteSheetOperationModes.OpExecSheetDeleteSymbol;
atSheetOperation[1].Qualifier = (int)ExecuteSheetOperationModes.ArgExecSheetRef2Symbol;
atSheetOperation[1].Value = oSymbol.Id;

IList<ExecuteSheetRecordData> list = atSheetOperation;

Globals.ex_Application.ExtendedUtils.ExecuteSheetOperation(oSheet, ref list);
}


What did I wrong?

Thanks in advance.

~Philipp~