I have tried the following
- Code: Select all
props.globals.getNode("models/model[1]/submodels/path", 1).setValue("/Models/Aircraft/H-60sm.xml"); #where model[1] is one of the models I have added through the propertyTree
props.globals.getNode("models/model[1]/submodels/serviceable", 1).setBoolValue(1);
I noticed when I added the submodel using the XML techniques that nodes were created under /ai. Do I need to add these nodes manually also? I've tried searching through the forums/wiki, but don't seem to be able to find this documented anywhere, even though it is alluded to in several places.
I guess my question is this: what nodes do I need to create in order to attach a submodel to a model (that is not the main simulation model) using the propertyTree method? or is it possible using the fgcommand("add-model",...) method to slave a submodel to a model?
Thanks,
Robbo