API ReadFileAirfoil functionality

72 views
Skip to first unread message

Zach Ernst

unread,
Mar 9, 2017, 2:58:23 PM3/9/17
to OpenVSP
I have a general question about the functionality of the ReadFileAirfoil function in the API.

The last topic I found on that function in this group was from 2015, and I was wondering if anything had changed with it. Running the TestAll.vspscript in version 3.10 reports "ReadFileAirfoil::Error reading airfoil file." I just checked with the new version (3.11), and got the same error (along with an erro rfor ReadFileXSec as well). The wiki also seems to be short on information on the subject.

Does anyone have insight or code examples here?

Thanks,

Zach

Rob McDonald

unread,
Mar 9, 2017, 3:01:58 PM3/9/17
to ope...@googlegroups.com
Off the top of my head, the problem is usually that the airfoil file
isn't in the right directory (form the point of view of the test
script).

It looks like the test script has hard-coded...

ReadFileAirfoil( xsec, "../../N0012_VSP.af" );

Which searches for N0012_VSP.af two directories above the working
directory that the script is running in. The working directory can
vary depending on your OS and how the program was run (double-click
vs. command line, etc).

This file is distributed with VSP, or can be found in the
examples/airfoils directory of the source distribution.

Try getting the airfoil the the right place and I think the test should work.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "OpenVSP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openvsp+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Zach Ernst

unread,
Mar 9, 2017, 3:33:52 PM3/9/17
to OpenVSP
Yes, that was the issue. I thought my path was one directory down than it was. The code ran correctly once I changed the path to "airfoil/N0012_VSP.af"

Thanks!
Reply all
Reply to author
Forward
0 new messages