Hello,
I have written a short script (actually, it's a Python script reading in an NDARC .geom file and creating a VSP script of the NDARC output, if folks here are familiar with that code), but I am having trouble with the basics of generating a fuselage and editing the various cross section parameters.
I have:
void main()
{
string fid = AddGeom( "FUSELAGE", "" ); // Add Fuselage
string xsec_surf = GetXSecSurf( fid, 0 ); // Get Surf object of fuselage
int num_xsecs = GetNumXSec( xsec_surf ); // Find out how many cross sections
for( int i = 1; i < num_xsecs - 1; i++)
{
string xsec = GetXSec( xsec_surf, i ); // Create a variable for the current Xsec
ChangeXSecShape( xsec_surf, i, XS_GENERAL_FUSE ); // Change the xsection to general fuse
SetParmVal( fid, "Height", xsec, 6.0); // Set the xsection height
}
}
The SetParmVal does not seem to change the height, although the script does not error out. Hardcoding the SetParmVal line to read:
SetParmVal( fid, "Height", "XSecCurve_1", 6.0); // Set the xsection height
Does not change the height to 6 either.
Any help would be greatly appreciated. Thank you!
Bryan Sandoz