How can I set the time properties for a feature class or a layer via arcpy? For example, it appears that the layerTime classes are not available in Pro when compared to ArcMap?
A lot is different in on the mapping side
Migrating from arcpy.mapping to ArcGIS Pro—ArcGIS Pro | Documentation
But for sure Joshua Bixby says no in this thread
Does Pro Py have a method to access the time property in a time-enabled layer?
and I can't find one either or a replacement in CIM
Python CIM access—ArcGIS Pro | Documentation
But, on a lark, have you just tried replacing 'mapping' with 'mp' ? I don't have a time-enable layer to check, perhaps it is just missing from the help docs
arcpy.mapping.Layer(r'C:\Project\Data\Time\TemperatureWithTime.lyr')
arcpy.mp.Layer(r'C:\Project\Data\Time\TemperatureWithTime.lyr')
Angus, have you ever found a solution to this problem?
Angus Hooper, Aleksandra Zietara, layer time properties are accessible via the CIM and embedded in the feature table (CIMFeatureTable) properties. See:
I'm not sure how long those items have been exposed in the CIM, but it's been at least since 2.5. Hope that helps! 🙂