Changing wing span in .vsp3 file

37 views
Skip to first unread message

nate carr

unread,
Jan 28, 2026, 9:51:14 PM (5 days ago) Jan 28
to OpenVSP

Hi,

I’m working on a long term project where I want to automate OpenVSP + VSPAERO for parametric geometry sweeps. Right now I’m just trying to change span automatically.

What I’m doing is pretty simple I read a .vsp3 as text in MATLAB, replace the TotalProjectedSpan value, and write out a new .vsp3. 

Screenshot 2026-01-28 210116.png

what has happened though is when I open the edited file in OpenVSP, the span changes but not to what I typed. The original span is 18. If I set TotalProjectedSpan to 21 in the file, OpenVSP shows 19.4422. If I set it to 22, OpenVSP shows 19.89975. So it’s definitely responding, but it isn’t sticking to the value I set. Is TotalProjectedSpan not the right parameter for the span I’m looking at in the GUI?

Also, when OpenVSP opens the edited .vsp3 I get an Unknown I/O error. Could that be something on the MATLAB side like how I’m writing the file, or is there a common reason OpenVSP gives an I/O error when a .vsp3 was edited outside the program?

Longer term, if I’m doing this for a real automation/optimization workflow, should I stop editing the XML directly and use the OpenVSP API to set parameters and save instead? And if the API is the right way, is Python basically what I should be using for this vs MATLAB? I can learn Python if that’s what makes the most sense, I don't want to get into the weeds with this and then realize I need to do it a different way.

Thanks,
Nate Carr

Rob McDonald

unread,
Jan 28, 2026, 9:55:14 PM (5 days ago) Jan 28
to OpenVSP
You should not edit the *.vsp3 file directly.  Nothing good can come of that.

For simple parametric variation workflows, you should look at using the *.des file capability.

There is a video about this capability here.

For more complex things, you should use the Python API.  Some users have reported success using the Python API directly from Matlab.  I don't know how that works, but it can be done.

You generally want to modify the span and other wing parameters on a per-panel basis -- not by the Total parameters.  Go to your model in the GUI, click on the label for the Parameters that you want to vary.  A window will pop up that will show the full designation of that parameter.  Even better, you can drag-n-drop that Parameter into the Design variables UI when creating a *.des file.  It is in the video.

Rob

Brandon Litherland

unread,
Jan 29, 2026, 9:28:55 AM (4 days ago) Jan 29
to OpenVSP
I'll second Rob's comments and add a link to the introduction to automation slides from the VSP workshop in 2024: https://openvsp.org/wiki/lib/exe/fetch.php?media=workshop24:2024_vspws_python_api_and_vspscript.pdf
Automating VSP model changes can be done via DES/XDDM files as Rob pointed out.  It is also very simple to make these changes using the VSPSCRIPT features (see demos in the "scripts" folder of your OpenVSP download). Automating VSPAERO can also be done with VSPSCRIPT but I would recommend using Python.  It all depends on your particular problem and desired outcomes.  For relatively short automations, say 100 or so cases or fewer, you can directly modify a vspscript file and execute that each time, parsing output files as needed.  Anything more than that, or if you plan on running your automation over and over, it's better to directly work with results from memory in the Results Manager.  Here is a link to the API documentation to get you started.  OpenVSPAPI: Documentation for the OpenVSP API

Note that the scripts folder has many examples of automating analyses that you can use as a starting point.

nate carr

unread,
Jan 29, 2026, 12:34:58 PM (4 days ago) Jan 29
to OpenVSP

Hi Rob and Brandon,

Thanks, this helps a lot. I’ll stop editing the .vsp3 directly and use the .des workflow for simple sweeps, then VSPSCRIPT/Python for the larger automation . Also appreciate the per panel span tip and the links/resources.

Best,
Nate 

Reply all
Reply to author
Forward
0 new messages