How to change or repalce the body or Part ID in Spaceclaim and Mechanical using python?

Mahesh_G
Mahesh_G Member Posts: 6
First Comment
**

When simulating design iterations, I need to set up the model from scratch. In DesignModeler, if I replace new geometry over the old geometry, the IDs are automatically replaced, and the entire model setup is retained. However, in SpaceClaim and Mechanical, how can we set up to replace these IDs to avoid this rework task in Mechanical?

Best Answer

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 864
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭
    Answer ✓

    If the named selections are defined robustly the model setup should be maintained. This looks more like an issue with the modelling approach than a scripting question. I'd encourage you to get in contact with your local Ansys support provider so that you could discuss into more details your model setup and they could give recommendations to improve robustness.

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 864
    500 Comments Photogenic Name Dropper Solution Developer Community of Practice Member
    ✭✭✭✭

    As far as I'm aware we can't control the IDs. The recommendation is to use Named Selections so that the Mechanical model is rebuilt automatically.

  • Mahesh_G
    Mahesh_G Member Posts: 6
    First Comment
    **

    Yes, we can use named selection, but the entire model setup is not retained, including mesh, contacts, material assignments, and boundary conditions. Additionally, for named selection, we need to re-scope, which adds an extra task. I've experienced in DesignModeler that replacing old geometry with new geometry at import location in tree, its retains the entire model.

  • Abhijith Rajan
    Abhijith Rajan Member, Employee Posts: 8
    First Answer First Comment First Anniversary
    ✭✭✭

    Hello Mahesh, If you are looking to retain the mesh/contacts in the unmodified bodies, you can use the Associative setting in Compare Parts on Update option in WB. You may find the same in the following link https://forum.ansys.com/forums/topic/save-preserve-retain-existing-mesh-when-adding-new-parts-to-a-large-geometry/