CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [Workbench] SpaceClaim Script Integration into WB Journal (https://www.cfd-online.com/Forums/ansys-meshing/214433-spaceclaim-script-integration-into-wb-journal.html)

mertal1905 January 31, 2019 02:02

SpaceClaim Script Integration into WB Journal
 
Dear all;

I want to automize my parametric simulation process recording and using WB journal.

I have created my SpaceClaim script using recording option in SpaceClaim.

When i record a journal file in WB, geometry section of the code looks like this:

geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.Edit(IsSpaceClaimGeometry=True)

???

geometry1.Exit()


I know I should put my SpaceClaim code between geometry1.Edit(IsSpaceClaimGeometry=True) and geometry1.Exit() (where i put question marks). Can anyone help about the function which gets geometry code into the WB journal?

Thanks in advance.

Mareeah September 13, 2019 11:17

Hey Mert,

Have you maybe found a solution for this? I am having troubles with the same. I was trying to execute the Spaceclaim script from workbench file, but it didn't work..

l.cappugi February 28, 2020 09:13

Hi Mareeah,
I have the same problem too!

Have you found a solution?

l463li March 26, 2020 11:00

Hi guys,

Have you found the solution?

mertal1905 May 11, 2020 17:18

Hi guys;

You should .py geometry file for spaceclaim and then you can read this file in WB journal file like this:

geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.Edit(IsSpaceClaimGeometry=True)
DSscript = open("C:/.../.../.../geometry.py", "r")
DSscriptcommand=DSscript.read()
DSscript.close
geometry1.SendCommand(Command=DSscriptcommand,Lang uage="Python")
geometry1.Exit()


All times are GMT -4. The time now is 06:24.