Hello Team
To drop a symbol in the sheet, I'm using the function below.
The issue I'm seeing is that some of the shape
associations are missing when we use bulk data, and debugged code isn't throwing any exceptions either.
I've included a drawing reference for the missing shape; kindly respond as soon as possible.(High Priority)
public string SheetDropSymbol(Sheet sheet, string ShapeID,string ObjReferenceID, double xTransformed, double yTransformed)
{
string DroppedShapeId = string.Empty;
var response = Helper.EbaseApp.AlertResponse;
Helper.EbaseApp.AlertResponse = AlertResponse.YesOk;
if (!string.IsNullOrEmpty(ObjReferenceID))
{
int CopyComplete = 3;
IList<ExecuteSheetOperationRecordData> paramListShape = new List<ExecuteSheetOperationRecordData>();
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.OpExecSheetDropSymbol, null));
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetRef2Master, ShapeID));
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetPosX, xTransformed));
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetPosY, yTransformed));
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetCopyMode, CopyComplete));//Flat 1,
if (!string.IsNullOrEmpty(ObjReferenceID))
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetRef2Obj, ObjReferenceID));
paramListShape.Add(GetNewExecRecord(ExecuteSheetOperationModes.ArgExecSheetRetVal, ""));
sheet.ExecuteSheetOperation(ref paramListShape);
Helper.EbaseApp.AlertResponse = response;
ExecuteSheetOperationRecordData retval = paramListShape.LastOrDefault();
paramListShape.Clear();
if (retval.Qualifier == (int)ExecuteSheetOperationModes.ArgExecSheetRetVal && retval.Value is string)
{
if (!string.IsNullOrEmpty((string)retval.Value))
{
DroppedShapeId = (string)retval.Value;
}
}
}
return DroppedShapeId;
}