How to modify a geometry and its parameters in Python

Hello!
I'm wondering if it is possible importing a Design Modeler Geometry (.anf or .agdb file...) in Python, getting the list of its parameters and being able to modify them to get an updated model.

Thanks in advance!

Answers

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 361
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    There is not a direct route to this as the PyAnsys geometry isn't really able to work with DM like that. I think the only way would be to use PyWorkbench to open a WB session, import the DM file as a geometry cell, and then you could use WB to set the parameters and refresh the geometry. Save this, and you should have a new .agdb file in the WB project, updated per the parameters.