Fluids

Fluids

How to include spaceclaim .scscript in a workbench journal?

    • sud85
      Subscriber

      I have recorded a script in spaceclaim which is saved as a .scscript file. I am trying to include this file into the main journal file(.wbjn).

      Following is the code:

      # encoding: utf-8

      # 2020 R2

      SetScriptVersion(Version="20.2.221")

      template1 = GetTemplate(TemplateName="Fluid Flow")

      system1 = template1.CreateSystem()

      geometry1 = system1.GetContainer(ComponentName="Geometry")

      geometry1.Edit(IsSpaceClaimGeometry=True)

      ***DSscript = open("filepathScript_SC_Cubic_1.scscript", "r")

      ***DSscriptcommand = DSscript.read()

      ***DSscript.close()

      ***geometry1.SendCommand(Command = DSscriptcommand)

      geometry1.Exit()


      The code runs into an error if I include the *** lines. If they are commented out, I get no errors.

      A similar question has been asked at this link but it does not have a complete answer. https://forum.ansys.com/discussion/13541/run-spaceclaim-scscript-script-from-ansys-workbench-journal-file

    • RK
      Ansys Employee
      Hello,
      Can you please try this in the new version (2022 R1)?
Viewing 1 reply thread
  • You must be logged in to reply to this topic.