New to Dynamo and the Python language as a whole; having to learn on my feet a bit. Have a schedule within Revit that want to export out to a text file. That part was easy with a little bit of Dynamo and code from this site. I am not though looking at padding one of the fields within the schedule so that when it is exported out to a text file it is 3 characters in length and has 0’s in the front. Any help would be appreciated. Below is my node breakdown and code.
import clr clr.AddReference("RevitAPI") from Autodesk.Revit.DB import * schedule_list = IN path = IN filename_list = IN result_list =  names =  for index, sched in enumerate(schedule_list): schedule = UnwrapElement(sched) filename = filename_list[index] try: export_options = ViewScheduleExportOptions() export_options.ColumnHeaders = ExportColumnHeaders.None export_options.Title = False export_options.FieldDelimiter= ";" export_options.TextQualifier = ExportTextQualifier.None definition = schedule.Definition ids = definition.GetFieldOrder() for id in ids: param = definition.GetField(id) names.append(param.GetName()) schedule.Export(path, filename, export_options) result_list.append("Schedule exported ") except: result_list.append("Export failed ") OUT = result_list