Trying to use the "Create LRS Network From Existing Dataset" GP tool. The document states ID fields should be text or GUID. Mine is GUID, but it gives me error saying the field is not correct type. It happens for both the Route ID and Line ID fields. In the screenshot below both the RouteId and LineId fields are GUID. I am using ArcGIS Pro 2.9.
Thanks
Hi Masao,
Your RouteID and LineID fields will need to be a consistent field type (either all GUID or all String) throughout all of your minimum schema items. Can you confirm you've modeled RouteID as a GUID in calibration points, centerline sequence, and any other schema items with those fields?
Nathan
ArcGIS Roads and Highways team
I was not able to replicate your issue. I am using ArcGIS Pro 2.9.2:
You may want to contact Esri Technical Support to assist you further.
-Amit@esri | Esri Transportation LRS Team
Thanks for trying. Thanks for the screenshot, that helps a lot. I just upgraded mine to 2.9.2 and tried again, but still having the same issue with same data you have tried. I cannot figure out what I am doing different. Can you export the Python from your session, so I can make sure I am doing the exact same thing as you did?
import arcpy
arcpy.locref.CreateLRSNetworkFromExistingDataset(r"C:\GISTemp\RH_002i_test.gdb\LRS\N_SRMP", "LRS", "RouteId", "RouteName", "FromDate", "ToDate", "DO_NOT_DERIVE", '', "INCLUDE", "LineId", "LineName", "LineOrder", "AUTOGENERATED_ROUTE_ID", None)
Thank you. I ran that and got the same errors. Below is the output. For now I decided to do what I needed to do in different way so I do not need to rely on this tool. Still, this is very strange...
arcpy.locref.CreateLRSNetworkFromExistingDataset(r"C:\Temp\RH_002i_test.gdb\LRS\N_SRMP", "LRS", "RouteId", "RouteName", "FromDate", "ToDate", "DO_NOT_DERIVE", '', "INCLUDE", "LineId", "LineName", "LineOrder", "AUTOGENERATED_ROUTE_ID", None)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\locref.py", line 1946, in CreateLRSNetworkFromExistingDataset
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\locref.py", line 1943, in CreateLRSNetworkFromExistingDataset
retval = convertArcObjectToPythonObject(gp.CreateLRSNetworkFromExistingDataset_locref(*gp_fixargs((in_feature_class, lrs_name, route_id_field, route_name_field, from_date_field, to_date_field, derive_from_line_network, line_network_name, include_fields_to_support_lines, line_id_field, line_name_field, line_order_field, route_id_configuration, individual_route_id_fields), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
WARNING 130002: The input feature class is not empty.
ERROR 000308: Invalid field type
ERROR 000308: Invalid field type
Failed to execute (CreateLRSNetworkFromExistingDataset).