-
Using Mechanical Scripting, how can I export images of results?
-
How can I read a file using Python?
How can I read a file using Python?
-
Mechanical ACT Documentation
Hello, is there any consolidated documentation of commands, functions and properties for scripting in mechanical using python? I often got stuck looking for the desired function/property. ACT Reference quide is quite poor documentation. Also best practises as listing availible stuff in console are welcome. Thank you
-
Best practices for visual studio ACT Extension Python Coding
Does anyone know of any documentation on how to set up visual studio / have any recommendations for a typical workflow on how you code? I've been coding without an IDE, but this requires repeated opening and closing of mechanical to refresh my code whenever I'd like to test it. I'm also coding without type suggestions from…
-
Export local variables from existing AEDT project
In an existing Ansys Electronic Desktop project, I have defined a list of variables (Design Properties > Local Variales). I want to export the variables and the values, so I can reuse them in a Python script with AEDTLib. How can I do that?
-
Mechanical Scripting -export figures etc. as Word file
Hello, I want to send the figures directly into the word file. Is there any simple code ready for this? https://www.linkedin.com/pulse/script-tip-friday-connecting-mechanical-excel-structural-analysis import clr clr.AddReference("Microsoft.Office.Interop.Word") import Microsoft.Office.Interop.Word as WordNS I read the link…
-
How do I find the time varying center of gravity location of my deforming body using DPF?
The COG of a body might vary with time as the body deforms and you might be interested in knowing how to compute the time varying COG. This example also highlights on how you can create your own mesh with DPF.
-
How to get time, load step and max sub step at a given load step information from dpf?
We might be interested in extracting below info:
-
What is the alternative to NumPy in iron python?
Because Numpy and SciPyY are numerical libraries supported by Python rather than IronPython, they cannot be used with ACT.
-
How do you view available packages?
I am new to IronPython and trying things out in Mechanical python scripting. In regular Python, you can do help('modules') to get a list of all packages that you have installed/available. E.g. you can check if numpy is installed from within the interpreter. Is there an equivalent way to do this in IronPython? Not all the…
-
How can I create a file in python?
How can I check if a file exists and create it if it doesn't?
-
Function to create json file
Do we have a function to dump dictionary to a json file?
-
Function to copy files from one folder to another
How can we copy files from one directory to another?
-
How to setup IronPython environment in VS and run an external Python script
How to set up Python environment in VS 2019 in order to run external Python script?