Can't export mesh from SpaceClaim using Python script

Hi all,

I am trying to export a mesh from SpaceClaim using a python script. The SpaceClaim tree looks like this:

My script was generated using the record option in the scripting menu:

It works fine when I run it straight from SpaceClaim. Unfortunately, when I try to run the code from a batch file I get the following error:

How can I select the “Blocking1” object for the python code?

Thanks!

Patrick

Comments

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 85
    Photogenic 5 Likes Name Dropper Ansys Employee
    ✭✭✭✭

    Hello, I have not used spaceclaim meshing a lot. Please attach scodc file.

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 85
    Photogenic 5 Likes Name Dropper Ansys Employee
    ✭✭✭✭

    The clear reason is that you are using smart variable. Next time when you run the script, variable "Blocking1" will not be detected and you will get this error. You should scope of a block using name so that you are sure of what you are extracting.