-
ATTENTION NEW USERS! READ THIS POST BEFORE DOING ANYTHING!
Hello all! Unfortunately the forum has recently been the victim of a spam attack, which you may have seen. We've got it under control but whilst we work to shore up the walls, so to speak, we have unfortunately gone into lockdown and you will not be able to post anything for a while. Please bear with us whilst we address…
-
New search functionality for the Ansys dev portal
Hello to our forum and portal users! We are very excited to be on the verge of rolling out our new unified search for the Ansys Developer Portal and Forums. This search will bring together the documentation and articles from the dev portal and posts and information on the forum into a new single search. Over time we will…
-
Welcome! Please Read Before Posting
Welcome to the Ansys Developer community! If you are using the developer tool packages with Ansys simulation tools then this is your community space. This community has been created to ask questions of your peers, exchange ideas, and converse about developer issues within an Ansys context. Here are some guidelines: Keep…
-
[ANSYS Meshing] how to activate curvature for a "sizing" in a script?
Hi, 1- How can the "Capture Curvature" option be activated for a typical "Sizing" setting while scripting? Recording can't add such a line in the script. I learned that there is a command to activate this for the global mesh configuration, like: ``` Code: mesh_1.CaptureCurvature = True ``` But how can I activate this for…
-
How to group toolbar entries within the xml-file?
Is it possible to group toolbar entries from an ACT in the same way as the entries in the native mechanical tabs? How can I name this group? e.g.: Toolbar: "Model" ----Group: "Prepare" ----Entry1: "Symmetry" ----Entry2:"Connections" ----... ----...
-
How can I use PyMechanical to import a .k file?
I can import data using ExtAPI.Application.ImportMesh('./drop.k') on Windows, but it doesn't work on Linux. What should I do?
-
Workbench Mechanical Update from CAD, UG can't close automatic
I have set the NX UG in CAD configuration, and then update the CAD Geometry in Workbench through changing size in UG. When update CAD in Workbench, the corresponding UG geometry model will be automatically opened, but the UG model will not be automatically closed, is there a way or where to set it to make Workbench…
-
Mechanical API for "Table" Objects
Hello, Here is an example of a simple API for creating a "Table" object in Mechanical. These are available as of 24.1 release: TableGroup = Model.AddTableGroup() Tables = list(TableGroup.Children) for T in Tables: try: ExtAPI.DataModel.Remove(T) except Exception as e: pass Table = TableGroup.AddTable() TimeEnum =…
-
How to speed up command snippet creation and create a progress bar ?
Hi, Thanks to this post : https://developer.ansys.com/blog/script-tip-friday-efficiently-combining-mapdl-and-mechanical-scripting I wrote a similar function, with minor adjustments. My problem is : When the model contains lots of joints, the creation time is long ... very long. My questions are : 1- Is there a way to speed…
-
How can we in an automatic way do the same as function: Go To -> Joints For Selected Bodies
How can we in an automatic way, e.g., via mechanical scripting, do the same as function: Go To -> Joints For Selected Bodies?
-
How to change the body color
I want to change the body color using RGB settings. Even if I set it with RGB like in this example, the recorded script ends up showing it differently.
-
Where can I get the data of the materials I need to use?
For example, I want to use TPU materials to stretch the curved beam structure. Which website should I go to to get the corresponding material data of TPU?thanks!
-
How can I use a script to delete a named selection?
thinks!
-
Read Results at the Specific Locations
Hi, there. I am currently developing an ANSYS ACT automation tool to output deformations at specific locations. Note that these locations are different from the mesh nodes. The desired locations are described in XYZ coordinates via either a txt file or in-memory arrays (whichever is available in ANSYS). Some say that I can…
-
Python Result example - mapping data
Is there an example of Python Result to map result data from one mesh to another mesh?
-
How can I use the mechanical script to locate these six locations and delete them?
Thank you very much
-
How to extract the geo. properties by scripting?
As the subject, how could we extract the geo. properties by script in Mechanical. We need get the mass, the inertial moment, the gravity center of an assembly by script. We can insert a *GET command in the Solution to obtain the above information, as shown in the command below. However, the user wishes to retrieve this…
-
How to create a Python Result with a node scoping option and results coming from another result obj?
I evaluated a result with “Max over Time” on hundres of steps, which takes a lot of time to evaluate. Now, I would like to zoom into certain area, select FE items, say Nodes, plot this result only on those nodes without having to change the scope of the original result and reevaluate. Python result seems to be a solution.…
-
How to connect motor-CAD instance in remote machine
Hi @PyMotorCAD-Team i want to connect and launch motor-cad in my Remote server from my Linux machine by using Pymotor-cad scripting. i have seen PyMotercad documentation that motorcad API will use to achieve it. but i have not seen any example script for that, could you please guide me how to achive this.
-
How to extract result fields from LS-DYNA using PyDPF-Core
I would like to extract Principal stresses, von Mises stress and directional displacements fields from LS-DYNA using PyDPF-Core. Below is my implementation, but currently, I can only plot one displacement field, and it’s unclear which type of displacement it represents. Additionally, when trying to extract von Mises…
-
Access Output Control( Analysis Settings) in WB LS-DYNA with ACT Issued
I want to change Output Control (Analysis Settings) to **Time **and value is **0.01 **in WB LS-DYNA Below is my code. * Implicit_Analysis = ExtAPI.DataModel.Project.Model.Analyses[0] * solver = Implicit_Analysis.Solver * CaculateResultTemp = solver.Properties['Output Controls/Calculate Results At'] *…
-
Is it possible to retrieve geometry parameters using PyMechanical?
Hello Team, I have a SpaceClaim file that contains Named Selections and a single parameter. I would like to perform some analysis interactively via a web application using PyMechanical. Is there a way to retrieve the SpaceClaim parameter and integrate it into the web application? If so, could you please guide me on how to…
-
Retrieve the Outputs from subprocess.Popen
Hi, everyone. I have read that there are some discussions about using the subprocess.Popen() or subprocess.run() module to run CPython code. I have managed to call functions written in CPython by subprocess modules to make the plots. However, I have trouble retrieving the outputs from Cpython. Normally, subprocess.Popen()…
-
How to access the scaling for different steps of x dependent pressure values
Hello, I have written the following script to assign x dependent pressure values to some faces. pf = analysis.AddPressure() Ansys.ACT.Automation.Mechanical.LoadHelper.SwitchToTabular(pf) pf.IndependentVariable = LoadVariableVariationType.XValue pf.XYZFunctionCoordinateSystem =…
-
dpf.operators.result.coordinate_system() missing in 0.13.3?
Hello, With ansys-dpf-core==0.13.3: KeyError: "The operator CS doesn't exist in the registry... With ansys-dpf-core==0.13.0, the operator works. This is on clean system without standalone server instance. The model is read from Ansys 2024R2 .rst. Any comment? Also, where I could track changes from version to version?…
-
Use DPF to get Real Constant information
How can I use DPF to get the real constant ID of an element and then get the values of that real constant?
-
Rename all mechanical bodies, including in all components, according to each component’s name
A workaround to rename all bodies, including all parts/components in the Ansys Mechanical tree, can be achieved with a simple script. By running the following script, we can rename all bodies from ‘Initial Body Name’ to ‘Initial Body Name/Component’s Name’: parts=DataModel.GetObjectsByType(DataModelObjectCategory.Part) for…
-
Issue Generating Field Plots Using PyAEDT
Hi Everyone, I am encountering issues while generating and exporting field plots using PyAEDT. The process fails with the following error messages displayed in the AEDT Message Manager as shown in the screenshot: "Script macro error: Plot H_vector_plot is not valid. Make sure this plot is updated before export" However,…
-
How to export both free points (datum points) and sketch points to a csv file?
-
How to effciently use a field-MOP in oSL to evaluate stresses from a load history?
Once field-MOP is created in oSL 3D Postprocessing, we want to make use of it to generate csv files with the full stress tensor for a load history. How to make it efficiently?
-
Possible to copy sheet in excel document from Ansys?
Hello I have a small python script that writes results to an existing excel document. The script creates a new sheet for each result set in Ansys, and works as intended. Now I would like (for each result set) to: 1) Copy the first sheet in existing excel document and re-name it 2) Write Ansys data to cells of the copied…
-
How to export a figure of the Contact and Target Body View by script in mechanical?
The customer wants to export an image with contact body view and target body view.
-
How do I detect read-only characteristics of a named selection generation criteria?
The code below loops through the generation criteria for a named selection and saves the criteria selections to a list. chars = [ "Active", "Action", "EntityType", "Criterion", "Operator", "Units", "Value", "LowerBound", "UpperBound", "CoordinateSystem" ]gen_crits = []for gen_crit in ns.GenerationCriteria:…