CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

Import stp file ANSA scripting

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By greg.cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2020, 03:53
Default Import stp file ANSA scripting
  #1
New Member
 
Join Date: Jan 2020
Posts: 1
Rep Power: 0
m.signo3 is on a distinguished road
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
m.signo3 is offline   Reply With Quote

Old   February 6, 2020, 10:36
Default
  #2
New Member
 
Join Date: May 2014
Posts: 12
Rep Power: 8
greg.cfd is on a distinguished road
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.
m.signo3 likes this.
greg.cfd is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:58.