def get_parameter_info(self): parameter = super(OptimizationIndividualParameterInfoBuilder, self).get_parameter_info() parameter.parameterType = 'Required' parameter.datatype = "String" parameter.enabled = False scenario_parameter = arcpy.Parameter( displayName=self.cea_parameter.help + ' (scenario)', name=self.cea_parameter.fqname.replace(':', '/') + '/scenario', datatype='String', parameterType='Required', direction='Input', multiValue=False) generation_parameter = arcpy.Parameter( displayName=self.cea_parameter.help + ' (generation)', name=self.cea_parameter.fqname.replace(':', '/') + '/generation', datatype='String', parameterType='Required', direction='Input', multiValue=False) individual_parameter = arcpy.Parameter( displayName=self.cea_parameter.help + ' (individual)', name=self.cea_parameter.fqname.replace(':', '/') + '/individual', datatype='String', parameterType='Required', direction='Input', multiValue=False) return [ parameter, scenario_parameter, generation_parameter, individual_parameter ]
def get_parameter_info(self): parameter = arcpy.Parameter(displayName=self.cea_parameter.help, name=self.cea_parameter.fqname, datatype='String', parameterType='Required', direction='Input', multiValue=False) if not self.cea_parameter.category is None: parameter.category = self.cea_parameter.category return parameter
def get_weather_parameter_info(config): """Create two arcpy Parameter objects to deal with the weather""" weather_name = arcpy.Parameter( displayName= "Weather file (choose from list or enter full path to .epw file)", name="weather_name", datatype="String", parameterType="Required", direction="Input") weather_name.filter.list = LOCATOR.get_weather_names() + ['<custom>'] weather_name.value = get_db_weather_name(config.weather) if is_db_weather( config.weather) else '<custom>' weather_path = arcpy.Parameter(displayName="Path to .epw file", name="weather_path", datatype="DEFile", parameterType="Optional", direction="Input") weather_path.filter.list = ['epw'] weather_path.value = config.weather weather_path.enabled = not is_db_weather(config.weather) return weather_name, weather_path