We're updating the issue view to help you get more done. 

Problem Including Configuration Files

Description

I'm Experiencing problems with the #Include command at the beginning of a GMAT script. I'm having trouble if I use the Relative Path instead of the Full Path

For example

1) Using the full path and compiling the script
#Include 'C:\Users\afarres\Documents\project_WFIRST\RST_SKrepo\ConfigurationFiles\GMAT_RST_SatConfig.txt'

When I compile the script I get :
Successfully interpreted the script

2) Using the relative path
#Include '..\..\ConfigurationFiles\GMAT_RST_SatConfig.txt'

When I compile the script I get a lot of errors, all related to not understanding what the Satellites defined in the GMAT_RST_SatConfig.txt file are.

1: C:\Users\afarres\Documents\project_WFIRST\RST_SKrepo\TransferToLOI\MainGmatScripts\WFIRST_onerun_test_SRP_CB.script: **** ERROR **** Interpreter Exception: Nonexistent object "RST_SatIni" referenced during creating Wrapper for "RST_SatIni = RSTsat;" in line:
" 97: GMAT RST_SatIni = RSTsat; "
.
.
.
8: C:\Users\afarres\Documents\project_WFIRST\RST_SKrepo\TransferToLOI\MainGmatScripts\WFIRST_onerun_test_SRP_CB.script: **** ERROR **** Interpreter Exception: Undefined function, object, or disallowed object field "RSTsat.ElapsedDays" found in line:
" 120: TimeAtLOI = RSTsat.ElapsedDays; "

3) But this is not because I did not get the correct path of the File or miss-spelled the file name, because if I do so the error message is the following

1: C:\Users\afarres\Documents\project_WFIRST\RST_SKrepo\TransferToLOI\MainGmatScripts\WFIRST_onerun_test_SRP_CB.script: **** ERROR **** Interpreter Exception: The include file "../ConfigurationFiles/GMAT_RST_SatConfig.txt" does not exist in line:
" 6: #Include '..\ConfigurationFiles\GMAT_RST_SatConfig.txt'"

So it looks like the relative path only works if I have files One level Up not Two levels Up from the folder. I attach here the GMAT script that produces the error as well as the Configuration Folder for inspection.

Just so you have into context the File Structure that I have been using

RST_SKrepo
- ConfigurationFiles
- Functions
- TransferToLOI
o MainGmatScripts
 WFIRST_onerun_test_SRP_CB
o Outputs
- StationKeeping
o MainGmatScripts
o Outputs

I previously had the configuration files in TransfertoLOI and StationKeeping folders, but they use the same functions so it was hard to keep track of the changes I was making on them so they all used the same, so ended up configuration it like this and then is when I get the errors.

Environment

None

Assignee

Joel Parker

Reporter

Ariadna Farres

Labels

Development Build

None

Components

Affects versions

Priority

P1
Configure