Hello, I have a road shapefile created from GIS Editor. Somehow I receive a source code for generating a routable shapefiles. I already change the sourceShapeFilePath and routableShapeFilePath where the new routable shapefile will overwrite. But then an unexpected error occur. I will send you the part of the code where the error occur. Please I need your help. Thank You!
1.
RtgRoutingSource.GeneratingRoutableShapeFile +=
new
EventHandler<GeneratingRoutableShapeFileRoutingSourceEventArgs>(RtgRoutingSource_GeneratingRoutableShapeFile);
2.
3.
//error occur here saying "NullReferenceExeption was Unhandled"
4.
RtgRoutingSource.GenerateRoutableShapeFile(sourceShapeFilePath, routableShapeFilePath, OverwriteMode.Overwrite);
5.
6.
btnGenerateRoutableShapeFile.Enabled =
true
;
7.
MessageBox.Show(
"Routable Shape File has been Build! You can Start building routing index with it now."
);