|
[Sponsors] |
August 29, 2017, 06:54 |
Ansa Python Scripting
|
#1 |
New Member
Renuka
Join Date: Aug 2017
Posts: 15
Rep Power: 9 |
I want to read all my ansa file and want to load it one by one in ansa window. How I do that using python script?My code
import ansa from ansa import * def main(): m = utils.SelectOpenFileIn('/home/user/', 1) #for selecting multiple files for i in range(len(m)): print(m[i]) Using above code I am able to select all my file but I want to load it to ansa window one by one. I am looking for specific function of loading which able to do that. Thank you. Last edited by Renu123; August 30, 2017 at 07:25. |
|
September 16, 2017, 13:45 |
open ANSA files one by one
|
#2 |
New Member
Join Date: Sep 2017
Posts: 5
Rep Power: 9 |
Hi,
Please use code wrap(# Button) from now on otherwise it will be difficult to understand the code. HTML does not provide TABS option Code:
def main(): selected_files = utils.SelectOpenFileIn('/home/user/', 1) #for selecting multiple files for each_file in selected_files: print("Each File :",each_file) ansa.base.Open(each_file) # for opening the file |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ansa Python Scripting | Renu123 | ANSA | 2 | August 29, 2017 04:46 |
[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 in paraFoam | chegdan | OpenFOAM Post-Processing | 0 | March 31, 2010 20:06 |