Hi All see below code which creates a replica of everything added to the layer in the last 7 days and saves to my drive. How do i set this FGDB as a output parameter to be used in model builder for further processing?
from arcgis.gis import GIS
from arcpy import env
import arcgis.features
gis = GIS("https://XXX.arcgis.com","XXX","XXX")
url = 'https://services8.arcgis.com/XXX/arcgis/rest/services/XXX/FeatureServer'
Digs = arcgis.features.FeatureLayerCollection(url, gis)
Digs.properties.capabilities
result = Digs.replicas.create(replica_name='Excavations',
layers=[0],
layer_queries = {"0":{"queryOption": "useFilter", "where": "CreationDate >= CURRENT_DATE-1"}},
return_attachments=True,
attachments_sync_direction='bidirectional',
wait=True,
data_format="filegdb",
asynchronous=True,
out_path='T:\\GIS Files\\XXX')
arcpy.SetParameter(1, result)
Solved! Go to Solution.
Figured it out
out_path=arcpy.GetParameterAsText(0)),
then configure the parameter setting in the properties of the tool
Figured it out
out_path=arcpy.GetParameterAsText(0)),
then configure the parameter setting in the properties of the tool