How to add a model in standalone Mechanical ?
![Erik Kostson](https://us.v-cdn.net/6037473/uploads/avatarstock/nXPEHISZX7D4V.png)
Erik Kostson
Member, Moderator, Employee Posts: 285
✭✭✭✭
We want to add via script say a cdb file to a standalone mechanical (Mechanical 2024 R2)?
Tagged:
0
Best 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
To control/define the imported cdb file units before importing (say for NMM consistent units):
mimp.UnitSystemTypeForImport=ModelImportUnitSystemType.UnitSystemConsistentNMM
1
This discussion has been closed.