How to add a model in standalone Mechanical ?

Erik Kostson
Erik Kostson Member, Employee Posts: 209
50 Answers 100 Comments Photogenic 5 Likes
✭✭✭✭
edited September 23 in Structures

We want to add via script say a cdb file to a standalone mechanical (Mechanical 2024 R2)?

Best Answer

  • Erik Kostson
    Erik Kostson Member, Employee Posts: 209
    50 Answers 100 Comments Photogenic 5 Likes
    ✭✭✭✭
    edited September 23 Answer ✓

    Below is an example on how it can be done via mechanical scripting in a new Mechanical standalone session (with the Start a New Mechanical Project option to get started).

    mimp=Model.GeometryImportGroup.AddModelImport()
    mimp.ModelImportSourceFilePath='D:\\DATA\\filecdb.cdb'
    mimp.Import()
    
    

    And if needed in/for 2D analysis add the below before importing (mimp.Import()):

    mimp.AnalysisTypeDimensionSetting=AnalysisTypeDimensionEnum.TwoD
    
    
This discussion has been closed.