Select to view content in your preferred language

Create LRS Network From Existing Dataset GP tool do not take GUID ID fields

1373
6
04-27-2022 05:44 PM
MasaoMatsuoka
Occasional Contributor

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.

MasaoMatsuoka_0-1651106386850.png

Thanks

 

Masao Matsuoka
0 Kudos
6 Replies
NathanEasley
Esri Regular Contributor

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

0 Kudos
MasaoMatsuoka
Occasional Contributor

Thanks for the reply. They are all GUID. I have attached a test FGDB.

Masao Matsuoka
0 Kudos
AmitHazra
Esri Contributor

I was not able to replicate your issue. I am using ArcGIS Pro 2.9.2:

AmitHazra_0-1651173670875.png

You may want to contact Esri Technical Support to assist you further.

 

-Amit@esri | Esri Transportation LRS Team

0 Kudos
MasaoMatsuoka
Occasional Contributor

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?

Masao Matsuoka
0 Kudos
AmitHazra
Esri Contributor
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)
0 Kudos
MasaoMatsuoka
Occasional Contributor

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).

Masao Matsuoka
0 Kudos