Cut polygons without selection edit task for arcmap v10 sp3

4762
18
Jump to solution
02-16-2012 11:16 PM
by Anonymous User
Not applicable
Original User: bwragg

Hi all,

I've spent days now trying to get the "Cut polygons without selection" sample (
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Cut_polygons_wit...) to work with ArcMap v10 sp3 (ArcView). We need this extension so we can trace selected features without selecting the polygon we want to split. I know what your going to say..."just use the normal 'Cut polygon tools' with the new trace tool that doesn't require to select features' but we can't use this tool as we have really complex data and we have to trace long distances. As a result when we have tested the new 'trace without a selection' feature we end up accidentally tracing many small features. Hence we would like to get this old sample working.

I'm not a vb developer but with some help from a developer I've downloaded the vb.net solution and compiled it. I've run ESRIRegAsm, select Desktop and it succeeds in registering it. I've checked the dependancies with dependancy walker and its all good. I've checked the Components.exe program and I can see it registers itself under "ESRI Engine Edit Tasks" but not under "ESRI Edit Tasks" which is the spot you would put it in 9.3 and 9.2. When I run ArcMap I can't see the task 'Cut Polygon without selection' in the task list. I assume this is because its not added in the Components.exe under "ESRI Edit Tasks". If I manually try to add it throws an error saying 'Can't Load Library'.

So is there a way to get this sample to compile and install so that it runs as a task in the normal Editor toolbar in ArcMap? Or have I missed some readme that explains this sample is only available in the Engine?

Also is there a reason ESRI doens't compile this as a dll like they used to for previous versions?

Thanks,

bwragg
0 Kudos
18 Replies
by Anonymous User
Not applicable
Original User: rbonar

I'm using 10.1. I tired to install the tool, but get a message saying I need to install version 10. Can we get the tool to work with 10.1?
0 Kudos
by Anonymous User
Not applicable
Original User: bwragg

sean_jones & ttruong thankyou so much! I just tried the compiled version in 10 sp5 and it works great.

We really appreciate your efforts. Thanks again.
0 Kudos
ThaiTruong
Occasional Contributor II
I'm using 10.1. I tired to install the tool, but get a message saying I need to install version 10. Can we get the tool to work with 10.1?


With ArcGIS Desktop v10.1, you need to use the addin that sean_jones created in post # 8
0 Kudos
by Anonymous User
Not applicable
Original User: rbonar

With ArcGIS Desktop v10.1, you need to use the addin that sean_jones created in post # 8


Thanks. My problem is I don't understand how to install it.
0 Kudos
JasonJohnson
New Contributor
Thanks. My problem is I don't understand how to install it.


I also do not know how to proceed with installing on 10.1.

I have previously registered the .dll and added this in 9.3.x, but I cannot find "esriRegSvr32.exe" in Program Files\ArcGIS\Bin for 10.1.

Am I missing a step?


These are the instructions I wrote for myself for a 9.3.x install, perhaps someone can tell me where I am going wrong.




Download and save correctly
1.Download and unzip your add in to a file location you desire.
2.Open the location and find the .dll file containing the name of your add-in.
3.Save a copy at :/Program Files/ArcGIS/Bin

Register the .dll 
1.Open Windows Explorer and navigate to C:\Program Files\ArcGIS\Bin.
2.Find �??esriRegSvr32.exe�?� and run it.
3.Check the �??Register Files�?� and �??Individual File�?� boxes, then click "select".
3.Find your .dll in the ArcGIS\Bin folder, then hit OK.

Add your .dll to the ArcGIS edit tasks
1.Open Windows Explorer and navigate to C:\Program Files\ArcGIS\Bin.
2.Find �??categories.exe�?� and run it.
3.Scroll to the folder �??ESRI Edit Tasks�?�, select it, then click �??Add Object.
4.Navigate to C:\Program Files\ArcGIS\Bin and select your .dll.

Verify
1.Start an edit session and see if the new tool is available in the Task dropdown.
2.If not, open the Editor Properties dialog; at Editor / Options / Edit Tasks.
3.Select the Add button and click on the Desired add in.
4.This should add the "Zipper task" or "Cut polygon without selection" to the list of tasks.

Thanks


I retract my previous inquiry on how to install on 10.1.

I used "the force" and figured it out; actually pretty easy, easier than in 9.3.x

Just double click on "CutPolygonsWithoutSelection.esriAddIn" that comes in the zip file.

Then simply add it by the same way you add any tool to the toolbar.

Thanks for making it!
0 Kudos
by Anonymous User
Not applicable
Original User: ttruong

It's been quite a while since I was here.  The attached is the new deployment package of the COM component version I just recompile today.  I modified the launch conditions to make it works for both ArcGIS 10.0 and 10.1.

For those who have trouble installing the add-in for 10.1, you can try this COM component version.  It should be as same as the add-in version that Sean Jones created for 10.1.

Let me know if you run into any troubles with the installer.
0 Kudos
by Anonymous User
Not applicable
Original User: bwragg

It's been quite a while since I was here.  The attached is the new deployment package of the COM component version I just recompile today.  I modified the launch conditions to make it works for both ArcGIS 10.0 and 10.1.

For those who have trouble installing the add-in for 10.1, you can try this COM component version.  It should be as same as the add-in version that Sean Jones created for 10.1.

Let me know if you run into any troubles with the installer.


Hi ttruong,

I just tried installing this on a new install of ArcGIS 10 sp5 and I get an error after clicking "install". It says "ArcGIS Desktop 10.0 or 10.1 is required before you can complete this setup". Any ideas?

Thanks,

bwragg
0 Kudos
MathieuBeaudry
New Contributor
Ok, the ported sample is up on arcgis.com as the Cut Polygons Without Selection Tool code sample.
This is a visual studio 2010 project that will create a 10.1 desktop add-in for use in ArcMap.

The code is included so you can generally see the pattern for creating edit tools that use the sketch in the 10.x framework.
The tool was created using the esri add-in templates in visual studio by creating a construction tool but without the category part, thus you still get an edit tool template that uses the sketch but without it being a construction tool. The code from the OnFinishSketch method in the engine edit task was then ported to the OnSketchFinished method in the add-in.

You can create COM dll for use in 10.0.x using the same pattern but by using the Desktop ArcMap Edit Tool template in the ArcGIS New Item wizard when creating a new class in your com dll project. Stick the code in the m_editEvents_OnSketchFinished method. Note that this has to be a com dll at 10.0.x because add-ins do not support implementing interfaces until 10.1, and you need to implement ISketchTool to use the sketch. Consider changing the ArrayList to generics and use a different method for the sketch-polygon intersection if you take this on.


Hello , i try to download your source code in the link above but it says that i don't have authorisation to see this content. I'm logged with my esri global account... Any tips ? Thx
0 Kudos
by Anonymous User
Not applicable
Original User: sean_jones

Sorry about that, I've shared it publicly. We're reorganizing those editing labs samples.
0 Kudos