Superelement - combine .dmig files and create /import condensed part

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 scripting, how can I combine .dmig files and use the combined file to create a condensed part?

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Options

    The below code can be used. Note that CombineTextFiles() method appends the second file to the first file.

    import os
    folder = r"D:\Data_CMS"
    path1 = os.path.join(folder,'NastranKMs3.dmig')
    path2 = os.path.join(folder,'NastranMs3.dmig')
    ExtAPI.DataModel.Project.CombineTextFiles(path1, path2)
     
    condensedGeom = ExtAPI.DataModel.Project.Model.CondensedGeometry
    importCondensedGeom = condensedGeom.AddImportedCondensedPart()
    importCondensedGeom.ImportFileFormat=CondensedPartFileFormat.SuperElement_MATRIX
    importCondensedGeom.CondensedPartFileName = path1
    condensedGeom.GenerateCondensedParts()
    
  • Alan_H_Escamilla
    Alan_H_Escamilla Member Posts: 1
    First Comment
    Options

    Does this work if my dmig files are .asm and .pch?

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 813
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Options

    @Alan_H_Escamilla I'm not sure what these .asm and .pch format stand for. What we are doing here is basically appending a text file to another text file. If you files are text format I think this should work. The best way to know is for you to try it out. If it doesn't work you can also try to modify the extension of your files to .dmig.

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 54
    5 Likes Name Dropper First Anniversary Ansys Employee
    Options

    @Pernelle Marone-Hitz Do you know how to promote Remote Points coming from an ICP with scripting?

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 54
    5 Likes Name Dropper First Anniversary Ansys Employee
    Options

    importCondensedGeom.CreateRemotePoints([1])