Best Of
-
Re: Python Script for Multi-Step Analysis: Activating/Deactivating Loads Per Step
What you are looking for is the API method on the displacement object itself. Below will set a disp. object as active for step 1 and deactivate for 2 and 3. Code the steps to your needs in your analy…1 -
Re: How can I check if a named selection in Ansys Mechanical is a nodal named Selection?
FYI, this is a more stable way to figure out if a NS is nodal or not: NS.Location.SelectionType==Ansys.ACT.Interfaces.Common.SelectionTypeEnum.MeshNodes1 -
Re: Rename Bodies by Location
You can get the body centroids and then sort them by the value of your choice. For example the Centroid[1] index is the Y axis globally. Example below assumes you have a Named Selection (NS) to start…1 -
pyDPF to do 2 simple tasks for LS prepost
Is there anyway I can carry out the following 2 tasks inside VS code without ever manually open LSPP 1) open LSPP (I can do this without using pyDPF or anything ansys related, with subprocess for exa…1 -
Re: How do i get the result values of selected nodes?
Hi @Bigpavel there's a way to read results directly from the .rst file: https://ansyshelp.ansys.com/public/account/secured?returnurl=/Views/Secured/corp/v252/en/act_cust_mech/Postprocess_externalResu…1 -
Re: Is your scripting up to scratch?
Thanks @"Manh Tuan" that's super impressive stuff! @"Naveen Kumar Begari" I know you've posted a lot in the past, do you have anything useful for us? If the @Structures-Scripting-…1 -
Re: How can I check if a named selection in Ansys Mechanical is a nodal named Selection?
@M that's a helpful tip. Thanks!1 -
How can I check if a named selection in Ansys Mechanical is a nodal named Selection?
Trying to automate some results extraction and I haven't quite figured out how to tell if the location/scope of the result, when it is a name selection, is nodes or a geometry/body.1 -
Re: How can I check if a named selection in Ansys Mechanical is a nodal named Selection?
@said Thanks! that is what I needed. I shortened it a bit and just loop through the named selections to generate the list of named selections Ids that have 'node' in the detail. nodal_ns_ids = []for …2 -
Re: How can I check if a named selection in Ansys Mechanical is a nodal named Selection?
Hi, maybe you can try something like this? This script assumes that all the Named Selections have unique names. # Get the result of interestsol = Model.Analyses[0].Children[3]tot_def = sol.Children[1…2