Modify the Workbench Journal File

Edit the Workbench journal to insert a reference to the Polyflow journal file. Replace setup1.Edit() with:

boolean1 = setup1.EditSetup(templateMode=True, ScriptFilePath="D:\\WBProjects\\myPolyflowJournal.py")

See below for a full example.

Original:

# encoding: utf-8
SetScriptVersion(Version="25.2.74")
template1 = GetTemplate(TemplateName="Materials Processing")
system1 = template1.CreateSystem()
setup1 = system1.GetContainer(ComponentName="Setup")
boolean1 = setup1.Edit()
solutionComponent1 = system1.GetComponent(Name="Solution")
solutionComponent1.Update(AllDependencies=True)
Save(FilePath="D:/WBProjects/myNewScriptProject.wbpj", Overwrite=True)

Modified:

# encoding: utf-8
SetScriptVersion(Version="25.2.74")
template1 = GetTemplate(TemplateName="Materials Processing")
system1 = template1.CreateSystem()
setup1 = system1.GetContainer(ComponentName="Setup")
boolean1 = setup1.EditSetup(templateMode=True, ScriptFilePath="D:\\WBProjects\\myPolyflowJournal.py")
solutionComponent1 = system1.GetComponent(Name="Solution")
solutionComponent1.Update(AllDependencies=True)
Save(FilePath="D:/WBProjects/myNewScriptProject.wbpj", Overwrite=True)