I am using vb.net arcobjects to run "intersect" GeoProcessing tool, but get "Object reference not set to an instance of an object" error.
My code is as follows:
Dim objGP As IGeoProcessor = New GeoProcessor
Dim InputLayer = "dev_db.DBO.Segment;dev_db.DBO.LINE_1"
Dim output = "D:\dev\Seg_line_intersect"
objGP.OverwriteOutput = True
Dim objParameters = New VarArray
Dim objResult As IGeoProcessorResult = objGP.Execute("Intersect_Analysis", objParameters, Nothing)
The error is:
There are selected features in the segment layer.
I am using arcmap 10.2.2.
I failed to find what's wrong with my code, please kindly advice on it, thanks a lot.