Reading config file

streb2001

Addon Developer
Addon Developer
Donator
Joined
Feb 9, 2008
Messages
326
Reaction score
0
Points
16
Location
North Yorkshire
The Orbiter developer docs state that it is possible to add custom entries to the vessel's config file. I can't find an API function that allows these to be read. Does anyone know how to do this?

Thanks
 
Look in the Orbiter SDK folder.
 
Look for oapiRead_xxxx in the API Reference.
 
You can read the scenario files and vessel configuration files, but only inside clbkSaveState, clbkLoadState, opcSaveState, opcLoadState, clbkSetClassCaps, and sorry if I am forgetting any others.

You need to have the file handle, and the above functions provide you that. You can read parameters using:
oapiReadItem_bool, oapiReadItem_float, oapiReadItem_int, oapiReadItem_string, oapiReadItem_vec, oapiReadItem_nextline
 
Computerex to the rescue again! Yes, clbkSetClassCaps(FILEHANDE cfg) is passed the config file handle. I missed that one.

ED doesn't help that I am reading my huge printout of the Orbiter 060503 API doc rather than the latest version! I don't want to print it all again, it took me hours to file it all! /ED
 
Back
Top