Select to view content in your preferred language

Convert Editor IEditTask --> AddIns.Extension and get it as IEditTask on runtime

1651
4
Jump to solution
07-29-2019 12:41 AM
MarkMindlin
Frequent Contributor

Hi,

We convert old custom COM tools to custom AddIns and have a question - how to get it as IEditTask on runtime?

We need to set Application.CurrentTask with ESRI.ArcGIS.Editor.IEditTask, so the question is how to create an object with type IEditTask?

Old COM class:

   public class clsCustomEditTask : ESRI.ArcGIS.Editor.IEditTask

New AddIn class:

   public class clsCustomEditorExtension : ESRI.ArcGIS.Desktop.AddIns.Extension

The help says we cannot deploy (register) tasks in AddIn

See

ArcObjects Help for .NET developers 

ArcMap 10.6.1, C#

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Nope. The add-in framework was designed to simplify common control creation and deployment (tools, commands, toolbars, menus etc).

To rewrite your edit task as an add-in you could port the code over as a tool.

View solution in original post

4 Replies
by Anonymous User
Not applicable

Hi Mark,

I would like to understand the requirement, before helping you out. Could you please detail the requirement.

However, please have a look into the below link.

http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/IEditTaskSearch_Interfa...

Thanks.

0 Kudos
MarkMindlin
Frequent Contributor

Thanks Fayaz Baig

The link you provided did not helped.

Let do questions:

1. Is it possible to convert COM class:

   public class clsCustomEditTask : ESRI.ArcGIS.Editor.IEditTask

to AddIn?

2. Please send example (of an AddIn that contains IEditTask).

0 Kudos
MarkMindlin
Frequent Contributor

It looks like there is no way to convert it

0 Kudos
by Anonymous User
Not applicable

Nope. The add-in framework was designed to simplify common control creation and deployment (tools, commands, toolbars, menus etc).

To rewrite your edit task as an add-in you could port the code over as a tool.