SpaceClaim Python API: running embeded scripts

Gabriel
Gabriel Member Posts: 2
First Comment
**

Hello all!
I am running SpaceClaim in batch by using this command:
"D:\Apps\Program Files\ANSYS Inc\v242\scdm\SpaceClaim.exe" /RunScript=driver.py /ExitAfterScript=True /Headless=True /Splash=False

The script driver.py does the following (see attached files):
1. opens a SpaceClaim file “GearWithScript.scdoc”
2. overwrites the Script Parameter “NumberOfTheeth” to a value of 50
3. saves a picture as “Image.jpg”

I would expect that the embedded script “Gear” automatically changes the geometry if the “NumberOfTheeth” as in the interactive mode, but this does not happen (the picture shows me that the number of teeth in the gear is not changing, see picture Image.jpg vs Image_50.jpg).

To my questions:
1. is there a command in the Python API to re-run a specific embedded script?
2. How can I loop over the embedded scripts?
3. How can I differentiate between a geometric parameter and a script parameter using API commands?

I looked into the API documentation, but I could not find and hint to the embedded scripts under “Groups”.

Thanks in advance

Tagged:

Answers