Hello!
I am developing Addin that uses XFT LocateOperation like this:
using XFT = Bentley.Interop.Xft;
TextIdentifyFeatureLocateOperation oo = new TextIdentifyFeatureLocateOperation();XFT.locateOp oLocateOp = new XFT.locateOp();XFT.InputValue useSelectionSetValue = new XFT.InputValue();oLocateOp.EnableOperationAutoLocate = true;oLocateOp.ScanAtPoint = true;oLocateOp.ScanReferenceAttachments = false;oLocateOp.IncludeOnlyFeatures = true;oLocateOp.Mode = XFT.LocateOpMode.locateOpModeIdentify;oLocateOp.ClearSelectionSet = false;useSelectionSetValue.SetTypeAndValue(XFT.ValueType.ValueType_VALUE, "False");oLocateOp.AutoAcceptSelectionSet = false;oLocateOp.UseSelectionSet = useSelectionSetValue;XFT.CmdMgr cmm = new XFT.CmdMgr();cmm.StartLocateOperation(oLocateOp, oo);
TextIdentifyFeatureLocateOperation oo = new TextIdentifyFeatureLocateOperation();
XFT.locateOp oLocateOp = new XFT.locateOp();XFT.InputValue useSelectionSetValue = new XFT.InputValue();oLocateOp.EnableOperationAutoLocate = true;oLocateOp.ScanAtPoint = true;oLocateOp.ScanReferenceAttachments = false;oLocateOp.IncludeOnlyFeatures = true;oLocateOp.Mode = XFT.LocateOpMode.locateOpModeIdentify;oLocateOp.ClearSelectionSet = false;
useSelectionSetValue.SetTypeAndValue(XFT.ValueType.ValueType_VALUE, "False");oLocateOp.AutoAcceptSelectionSet = false;
oLocateOp.UseSelectionSet = useSelectionSetValue;XFT.CmdMgr cmm = new XFT.CmdMgr();cmm.StartLocateOperation(oLocateOp, oo);
So the user selects feature and it is being processed in the OnFinished event. After that I start the locate operation again so user could select another feature. But what I need is to provide ability to cancel that locate operation by pressing mouse right-button anywhere in the view. Is that possible as XFT.ILocateOpEvents does not have Reset event?
Thanks in advance
Hi,
ILocateOpEvents interface contains OnTerminate() method, which is in xft help described as "The system calls the OnTerminate event handler when the user aborts this operation by hitting a reset.".
I did short test (C# + Bentley Map V8i (SELECTseries 3) Standalone) and it seems it's NOT called when mouse reset button is pressed. So I am also curious if I missed something or it's a bug.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi, Jan!
Thank you for your response. I had already tried that and I also figured out it is not called. So I assumed I misunderstood something and made this question. And I am running V8i SS3 too.
So it looks like I will have to think of some workaround...
Anyway, thanks again, Jan! :)