admin管理员组文章数量:1208155
I was working on updating our older app to Arcgis Pro 3.3.
The code is set of AddIns which are added to Arcgis Pro. Its set of like 10 addins. Across the whole solution, FrameworkApplication.SetCurrentToolAsync is widely used and it works correctly in all addins apart from one.
The implementation is extactly the same, but when I activate the tool using "FrameworkApplication.SetCurrentToolAsync" it will not activate. I jave no idea why.
Usage:
await FrameworkApplication.SetCurrentToolAsync("ArcGISPro_SD_TiskoveVystupy_PolygonSelector");
Config.daml:
<tool id="ArcGISPro_SD_TiskoveVystupy_PolygonSelector" caption="PolygonSelector" className="PolygonSelector" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed32.png" condition="esri_mapping_mapPane">
<tooltip heading="Tooltip Heading">
Tooltip text<disabledText /></tooltip>
</tool>
ClassName:
internal class PolygonSelector : MapTool
{
public PolygonSelector() : base()
{
IsSketchTool = true;
SketchType = SketchGeometryType.Rectangle;
SketchOutputMode = SketchOutputMode.Map;
}
protected override Task OnToolDeactivateAsync(bool hasMapViewChanged)
{
return base.OnToolDeactivateAsync(hasMapViewChanged);
}
protected override Task OnToolActivateAsync(bool active)
{
return base.OnToolActivateAsync(active);
}
protected override async Task<bool> OnSketchCompleteAsync(Geometry geometry)
{
return true;
}
}
It will never jump to OnToolActivatingAsync and therefore no to OnSketchCompleteAsync. It will jump there only when I am activating another one, it will jump to OnActvating, right afetr that to Deactivating and the new tools does not jump to Activate once again.
Like I said, in other addins this works, here no, I am not sure what to look for and what could be the issue.
本文标签: net 80ArcGisFrameworkApplicationSetCurrentToolAsync does not activate toolStack Overflow
版权声明:本文标题:.net 8.0 - ArcGis - FrameworkApplication.SetCurrentToolAsync does not activate tool - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738752940a2110503.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论