-
-
January 9, 2025 at 4:12 pm
cardiac.scripter
SubscriberHi,Â
I have just started with PyMechanical. However, I am struggling to find documentation on the library.Â
I have an ansys model already meshed as an .inp file. How can I import that directly into PyMechanical?
Thanks in advance,ÂBen
-
January 9, 2025 at 4:14 pm
cardiac.scripter
SubscriberNot to worry.Â
I have found the documentation here: import_model — PyACP -
January 9, 2025 at 6:54 pm
Erik Kostson
Ansys EmployeeÂ
Â
Hi
This post shows how to import the cdb file into a standalone mechanical or via pymechanical (you need to save a .cdb file not a ds.dat ).
https://discuss.ansys.com/discussion/4431/how-to-add-a-model-in-standalone-mechanical
All the best
Erik
PS : this link shows how to save a cdb file :
https://innovationspace.ansys.com/knowledge/forums/topic/how-to-export-cdb-from-mechanical-without-solving-the-case/
Â
Â
Â
Â
-
January 9, 2025 at 10:44 pm
cardiac.scripter
SubscriberHi Erik,
I also have the model in .cdb format so thats fine.
The problem is the link I sent above is for pyACP. Do you know how I can do it for pyMechanical?Cheers
-
January 10, 2025 at 8:18 am
Erik Kostson
Ansys EmployeeÂ
Hi
Â
See the below link:
https://discuss.ansys.com/discussion/4431/how-to-add-a-model-in-standalone-mechanical
Â
Any questions on this, please post it in the above forum (dedicated to scripting).
Erik
Â
-
-
-
January 10, 2025 at 8:52 am
cardiac.scripter
SubscriberThank you Erik!
Here it is for anyone else:# Import the modelmimp=Model.GeometryImportGroup.AddModelImport()mimp.ModelImportSourceFilePath=input_filemimp.Import()-
January 10, 2025 at 11:05 am
Erik Kostson
Ansys EmployeeThat is great - glad it helped.
Thank you
Erik
-
-
- The topic ‘Importing a Ansys model into PyMechanical’ is closed to new replies.
- Error when opening saved Workbench project
- At least one body has been found to have only 1 element in at least 2 directions
- Script Error Code:800a000d
- Elastic limit load, Elastic-plastic limit load
- Element has excessive thickness change, distortion, is turning inside out
- Image to file in Mechanical is bugged and does not show text
-
1882
-
802
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.