i am doing the following in order to use the predefined tool points to line in arctool box

        Dim ptoline As ESRI.ArcGIS.DataManagementTools.PointsToLine = New ESRI.ArcGIS.DataManagementTools.PointsToLine
        Dim pgeo As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor
        ptoline.Input_Features = " D:\Mayur\shapefiles\new_pooint_3.shp"
        ptoline.Output_Feature_Class = " D:\Mayur\shapefiles\new_line123.shp"

        pgeo.OverwriteOutput = True

        Dim geoProcessorResult As IGeoProcessorResult
        geoProcessorResult = pgeo.Execute(ptoline, Nothing)

i dont know the exact syntax of it. after running it shows error on

geoProcessorResult = pgeo.Execute(ptoline, Nothing)

Error HRESULT E_FAIL has been returned from a call to a COM component.

the references geoprocessor and datamanagement tools are included.

the path to the input feature is correct. the o/p file is created automatically.

Is there any prerequisite to run geoprocessor?

Do I have to do that workspace thing also ?

snapshot of my arc toolbox

now i know that this "points to line " is something different from other tools. it is a (third party tool) CUSTOM TOOL i guess and their interfacing is different,

i tried out with other tools and they all worked perfectly.

Can you tell me whether my conclusion that it is a custom tool is correct or not?

How do I interface these custom tools?


1 Answer 1


I did it like this:

Dim pgeo As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor

pgeo.AddToolbox("c:\program files (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx")

Dim parameters As IVariantArray = New VarArray 



pgeo.Execute("PointsToLine", parameters, Nothing)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.