Import or export recipes at runtime
Use the RecipeImportExport NetLogic script to import recipes from a
CSV
file or export recipes to a CSV
file at runtime.- From theFactoryTalk Optix Studiotoolbar, selectTemplate libraries.
- InLibraries:
- SelectScripts.
- From the right pane, dragRecipes Import Exportto a folder in theFactoryTalk Optix StudioProject viewpane.DragRecipes Import Exportto theModelfolder.
- SelectClose.
- In theProject viewpane, select theRecipeImportExportobject.
- In thePropertiespane:
- In theRecipeSchemaproperty, select the recipe schema of the reference object.
- In theCSVFile, enter the full path of theCSVfile to import or export.C:\temp\export_recipes.csvNOTE: The fields of theCSVfile to import must be the same as the database columns.
- In theCSVSeparatorproperty, set the CSV delimiter.
- To delimit the fields with quotation marks in theCSVfile, set theWrapFieldsproperty toTrue.
- Configure the buttons to trigger import or export:
- Add a Button object in a container and associate its MouseClick Event with the NetLogic Import method.
- Add a Button object in a container and associate its MouseClick Event with the NetLogic Export method.
For more information, see Base control objects.
Provide Feedback