-
Migration from v222 to v232
Hi, ExtAPI.DataModel.InternalObject["ds"].Graphics.ResultPrefs.MinOn = FalseExtAPI.DataModel.InternalObject["ds"].Graphics.ResultPrefs.edgeDisplay = 2 This commande perfectly worked in Ansys 2022 R2 but not anymore in v2023 R2. I get the following error message: 'DispCallable' object has no attribute 'MinOn' Can you give…
-
Set Order of Execution for Python Objects in Mechanical
Is there a way to set the order in which Python Code/Results objects are executed? For example if After Solve I want to run multiple Python objects, but want them to run in particular order, can this be specified somehow?
-
How do you pass arguments to Mechanical stand-alone script from command line?
This other post describes passing args to a journal run in runwb2.exe, is there a way to do the same thing with a script in Mechanical stand-alone? AnsysWBU.exe -DSApplet -AppModeMech -nosplash -notabctrl -script script.py (I did try the -E flag, but no luck).
-
In Mechanical scripting, how can I run APDL using the same license as Mechanical?
In Mechanical scripting, I am using the RunAnsys() to do some custom post-processing in MAPDL. However RunAnsys() is looking for a license that I do not have.
-
How to export Time History tabular data of Force Reaction in Mechanical as a csv file?
I have several Force reaction objects in Mechanical and I want to export the time history for each Force Reaction object as a separate csv file which should have the columns Time, Fx, Fy and F_Total
-
In Mechanical (stand-alone), how do you start a new model or clear the existing model?
Is there a command in Mechanical stand-alone to reset/clear a model completely (similar to the "File -> New" menu command)? Was hoping for something like: ExtAPI.Application.New()
-
How to create probe labels at a node using ACT?
How to create probe labels at a node using ACT?
-
In Mechanical how to rename analysis based on names in Workbench ?
Hi, In Workbench, I renamed my analysis. In Mechanical, I have to rename all the analysis. Is there a way with a Python script (or other) to automaticly rename analysis in Mechanical, based on names in Workbench ? Thanks, Jean
-
How to export the information of all the convection loads in my Mechanical to a csv?
I want to export the below information as a csv file directly from Mechanical via scripting. 1. Convection load Name 2. Film Coefficient 3. Film Coefficient unit 4. Ambient Temperature 5. Ambient Temperature unit
-
DPF: time scoping in non-linear plastic structural analysis
I am new to the pyANSYS framework. Using ANSYS 2023 R2. I am running DPF in ANSYS Mechanical and post processing a structural non-linear plastic analysis with 200 substeps. I'm trying to scope my results in the time domain to the specific time that my max plasticity occurs. I do this with the following function and it kind…
-
How to create a named selection of nodes which have equivalent stress above a certain limit?
I have an equivalent stress result in Mechanical. I want to create a nodal named selection which has nodes corresponding to equivalent stress above a certain value
-
Read data from txt with apdl commands inserted in tree
Hello everyone! I'm working in workbench mechanical (2022r2) in a coupled field module. I want to insert apdl commands in the tree to read a table and interpolate to get some results. I have a file (txt with values separated by comma)with element ids and for each element i have temperature and two parameters defined.…
-
How to export results (SMISC - axial forces and moments) for all the beam connections in Mechanical?
I have lots of beam connections in the model. I want to export the data in the below format into a csv. beam element type id, Beam name in Mechanical, Fx, My_i, My_j, Mz_i , Mz_j
-
In Mechanical Scripting, how do I access the selected (highlighted) analysis tree object(s)?
I want to be able to access which branch(es) are selected:
-
Beam results, dpf, Mechanical
Is there any way to access beam results using Python?
-
Contour Plots on Changed Mesh (NLAD) using Python Result object (DPF) in Mechanical
How could I generate contour plots of custom results on a changed mesh (NLAD) during the solution in Mechanical?
-
How to export Graphics Annotations result to a text file?
How to export Graphics Annotations result to a text file?
-
How do I get analysis steps end times in Mechanical
You can do it in two ways: `#Get step end times 2 ways Analysis = Model.Analyses[0] print Analysis.StepsEndTime AS = Analysis.AnalysisSettings EndTimes = [AS.GetStepEndTime(i) for i in range(1, AS.NumberOfSteps+1)] print EndTimes`
-
How can I count and select shared faces in multibody parts with shared topology?
I have a model with shared topology. I want to identify which faces are shared between bodies, get a count of them and select them.
-
Parallel Threading vs Serial Threading in Mechanical ACT
Parallel Threading vs Serial Threading in Mechanical ACT
-
Can we get the PID or Process name for an launch: ExtAPI.DataModel.Project.Model.Solve()
I have some basic script to follow the CPU and RAM useage during a solve but it would be more focused if I could get the actual usage for the given analysis. To do that I need to know what PID or Process gets started when a solve is started. Any ideas
-
How to get the material properties for defined element using Mechanical API or DPF?
Hello team, I'm creating a script that gets the stress values in elements defined by element Id and would like to compare the stress values with the ultimate ones for material automatically. So, I wonder how to get the values of material properties for the element with a defined Id using Mechanical API or DPF? Thanks
-
How to retrieve the material name of an element in mesh ?
I want to get the material name for each element so ican get it's properties in engineering data. i am using dpf but it only gave me the matid and i don't know how to link it to the name of the material. Thank you in advance. @AKD-Scripting-Team
-
Python Result example: Plot Young Modulus on elements
Using DPF inside a Python Result in Mechanical, how can I plot the material properties on each element of the model?
-
How to delete a custom object by script?
How to delete a custom object by script?
-
Create and export contact tool results for all time steps
Using ACT scripting, I would like to create a contact tool pressure result for all contacts with names ending by "YES". Then I would like to export the contact pressure results to a text file, for each time step.
-
How can I using scripting get displacements as function of time at certain areas ?
We have a named selection in a mechanical transient (structural) system and we want to write all of the displacement for every time step to a text file for further post processing. How can we do that using mechanical scripting?
-
How to plot elemental custom results coming from a txt file in Mechanical?
I am an standard user of Mechanical, with no DPF background. I have got an in-house tool which makes a evaluation of my structure giving elemental custom results which can be written into a txt/csv file. I want to plot these elemental custom results in Mechanical.
-
How can add certain results and group them
How can I with mechanical scripting add say stress and displacement results into a folder group?