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?
Set the time properties on data—ArcGIS Pro | Documentation
LayerTime—ArcMap | Documentation
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! 🙂
Angus, have you ever found a solution to this problem?
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')
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.