|
[Sponsors] |
August 28, 2017, 10:29 |
Ansa Python Scripting
|
#1 |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
Hi all,
1. I want to read .ansa files contain in some directory, How I do that using python script? using following function I am able to read only current file which is open in ansa gui base.GetEntity(ansa.constants.NASTRAN, "PSHELL", 1) Looking for function that able to read all file at ones. 2. I am also looking for function that gives normal to surface. Thank you |
|
August 29, 2017, 04:06 |
Ansa python scripting
|
#2 | |
Member
Maries
Join Date: Mar 2010
Location: Coimbatore, India
Posts: 76
Rep Power: 16 |
Hi Renuka,
You can open ansa file with the command base.open(filename) Open, BETA PYTHON development Manual NAME: Open - Opens an existing file in ANSA. SYNOPSIS: ansa.base.Open(filename) DESCRIPTION: This function instructs ANSA to open an existing file. Arguments filename RETURN: It returns 0 in case of success or 0:OPEN_ANSA_FILE_SUCCESS, 1:OPEN_ANSA_FILE_PERMISSION_DENIED, 2:OPEN_ANSA_FILE_NOT_ANSA_DB, 3:OPEN_ANSA_FILE_NOT_VALID_CAD, 4:OPEN_ANSA_FILE_NOT_COMPATIBLE_DB, 5:OPEN_ANSA_FILE_READ_ERROR, 6:OPEN_ANSA_FILE_CAD_ERROR, 7:OPEN_ANSA_FILE_NOT_ALLOWED_IN_THIS_MODULE EXAMPLE: import ansa from ansa import base def main(): base.Open("C:/tmp/users/folder/data.ansa") I attached the screenshot of the script window. You can search for the ansa script command or function in the right side of your script window. You can learn ansa scripting by seeing the already available ansa scripts in ansa installation folder. You can source code of the user scripts in below folder BetaCAE\ansa_v17.1.2\scripts. You should know python and ansa to do scripting. Without having experience in ansa, scripting is going to be very difficult for you. Regards Maries Quote:
|
||
August 29, 2017, 04:46 |
|
#3 | |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Filters using Python Scripting | Birro | ParaView | 0 | January 11, 2017 11:26 |
[ICEM] ICEM python geometry scripting | eromon84 | ANSYS Meshing & Geometry | 0 | December 12, 2015 12:39 |
python scripting in WB Windows.Forms OpenFileDialog() crashing | mvoss | CFX | 0 | November 4, 2011 04:46 |
Python Scripting - basic help | atareen64 | OpenFOAM Post-Processing | 4 | July 18, 2011 10:39 |
python scripting in paraFoam | chegdan | OpenFOAM Post-Processing | 0 | March 31, 2010 20:06 |