Select to view content in your preferred language

create Multiple ring buffer using arcobject.net sdk?

2926
7
02-28-2014 04:32 AM
aniketbabar
Emerging Contributor
I have Arcmap10.1 and arcobject.net with using this i have to create multiple ring buffer for selected layer .how can i do this what should i use for this please help me.
Thanks and regards
Aniket Babar
0 Kudos
7 Replies
DuncanHornby
MVP Notable Contributor
Aniket,

Why don't you call the existing geo-processing tool Multiple Ring Buffer (Analysis)? There are many examples of how to call a geo-processing tool in Help and on this forum. In ArcObjects consider using the IGeoProcessor interface.

Duncan
0 Kudos
aniketbabar
Emerging Contributor
hello sir,
i am creating some code like

Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer multibuff = new ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer(layer,@""+txtOutputPath.Text+"",multibufferdistance.ToArray());
IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(multibuff, null);


when i excute this code i got this error "LoaderLock was Detected" error Description=" Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang." i did'nt get the details of this error nor find any suggestion .
if you have any solution or sample code for this sent me link.

Thanks and regards
Aniket Babar
0 Kudos
AhmedEl-Sisi
Deactivated User
hello sir,
i am creating some code like

Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer multibuff = new ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer(layer,@""+txtOutputPath.Text+"",multibufferdistance.ToArray());
IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(multibuff, null);


when i excute this code i got this error "LoaderLock was Detected" error Description=" Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang." i did'nt get the details of this error nor find any suggestion .
if you have any solution or sample code for this sent me link.

Thanks and regards
Aniket Babar


Regarding this error can check this Solution, you should uncheck LoaderLock  from exception item in Debug menu in your Visual Studio.

For running MultipleRingBuffer tool, this sample should work for you



Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer multibuff = new ESRI.ArcGIS.AnalysisTools.MultipleRingBuffer();
            multibuff.Buffer_Unit = "Meters";
            multibuff.Distances = "10;20;30"; //string.Join(";",multibufferdistance.ToArray());
            multibuff.Input_Features = layer;
            multibuff.Output_Feature_class = @""+txtOutputPath.Text+"";
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(multibuff, null);


Regards,
0 Kudos
aniketbabar
Emerging Contributor
Hello ahmed sir
i have used your code and the direction to unchecked lock loader after doing all this i run my project again but it will display another error which i have attached image of error please give me some reply for this. and also write error details
error=" R6034 an application has made an attempt to load the c runtime library incorrectly. please contact the application's support team for more information"
Thanks and regards
Aniket Babar
0 Kudos
AhmedEl-Sisi
Deactivated User
Hello ahmed sir
i have used your code and the direction to unchecked lock loader after doing all this i run my project again but it will display another error which i have attached image of error please give me some reply for this. and also write error details
error=" R6034 an application has made an attempt to load the c runtime library incorrectly. please contact the application's support team for more information"
Thanks and regards
Aniket Babar


You can check this post it should help you.

http://gis.stackexchange.com/questions/72506/how-to-fix-runtime-error-r6034-an-application-has-made-an-attempt-to-load-th-c
0 Kudos
aniketbabar
Emerging Contributor
i have used all the direction on that link but did not got any solution if you have any another link for this problem send me thank you
0 Kudos
AhmedEl-Sisi
Deactivated User
i have used all the direction on that link but did not got any solution if you have any another link for this problem send me thank you

Form project properties in visual studio , navigate to debug tab then uncheck "Enable unmanaged code debugging" checkbox.
0 Kudos