Superelement - combine .dmig files and create /import condensed part
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
Using scripting, how can I combine .dmig files and use the combined file to create a condensed part?
0
Answers
-
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()
0 -
Does this work if my dmig files are .asm and .pch?
0 -
@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.
0 -
@Pernelle Marone-Hitz Do you know how to promote Remote Points coming from an ICP with scripting?
0 -
importCondensedGeom.CreateRemotePoints([1])
2