|
[Sponsors] |
January 31, 2020, 03:53 |
Import stp file ANSA scripting
|
#1 |
New Member
Join Date: Jan 2020
Posts: 1
Rep Power: 0 |
Hi everyone, I'm a beginner in ANSA scripting.
I need to import an stl file in ANSA but when I write the code the program opens a window in which I have to manually choose the file. Considering that I need to run an optimization procedure which must be completely automatized I need the program to open the specific file without my intervention. is that possible? To open the file I used those two commands shell = utils.OpenSelectFile(0,'(file-name.stp)') base.Open(shell(0)) Did I miss something? thanks in advance |
|
February 6, 2020, 10:36 |
|
#2 |
New Member
Join Date: May 2014
Posts: 21
Rep Power: 12 |
For STL files you need to use:
base.InputStereoLithography(filename) For STP files: base.Open(filename) The utils.SelectOpenFile() function opens the file manager window, so it should not be used for automated processes. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 10:03 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 21:53 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 19:43 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |