Define mesh sizing on a body in through Mechanical scripting

Options
Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

Using ACT, I want to scan the geometry, select the body named "Body1" and insert a body mesh sizing scoped on this body

Tagged:

Best Answer

Answers

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 133
    First Answer Name Dropper First Anniversary Ansys Employee
    edited May 30
    Options

    If we want to delete these (above mesh sizing):

    meshc=ExtAPI.DataModel.Project.Model.Mesh.Children
    with Transaction():
        for ms in meshc:
            ms.Delete()
    Tree.Refresh()
    

    if Transaction is causing issues, please remove it.