Export STL-file to specific location

Hey everyone,
I am currently adding a 'Smoothing' object to my 'Topology Density' result in order to generate a STL-file after topology optimization. The following code is used:

TOPO_OPT = ExtAPI.DataModel.Project.Model.AddTopologyOptimizationAnalysis()

Looking at the Mechanical GUI there is a file name field within the 'Smoothing' object, but it is set to read-only so I can't alter the file name or the directory where the STL-file is stored. Is there a way to create the file in a specific folder and also change its name using the PyMechanical interface?
At the moment I don't want to use other (pythonic) methods to locate the file and move it to the desired location. ANSYS should move it to the desired location in the first place.

Thank you!



  • Chris Harrold
    Chris Harrold Member, Administrator, Employee Posts: 90
    10 Comments First Anniversary First Answer Ansys Employee

    @AKD-Scripting-Team - can one of you weigh in here?

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 133
    100 Comments 25 Likes 5 Answers First Anniversary

    This is a product limitation that cannot be fixed by scripting other than, "to use other (pythonic) methods to locate the file and move it to the desired location". I recommend you contact your technical support provider and file an Enhancement Request.