1,396
edits
(Added section on Dumping the Property Tree - Changed Section Name "Protocols to access the property tree" to "Network Protocols to access the property tree") |
(Fixed broken dump properties command, rewrite for easier understanding) |
||
Line 83: | Line 83: | ||
Nasal command "io.write_properties" is used to dump all or part of the property tree to an xml file. The command can be entered interactively while using the simulator or as part of a script. | Nasal command "io.write_properties" is used to dump all or part of the property tree to an xml file. The command can be entered interactively while using the simulator or as part of a script. | ||
To enter the command interactively, select Nasal Console from the Debug menu and enter the command | To enter the command interactively, select Nasal Console from the Debug menu and enter the command: | ||
<code>io.write_properties(getprop("/sim/fg-home") ~ "/PropTree.xml", "/");</code> | |||
<code>io.write_properties( | This will dump the entire property tree, in a file containing more than 50,000 lines | ||
We can also dump only part of the property tree. For example, to dump everything in /instrumentation/kma20, we would use this: | |||
<code>io.write_properties(getprop("/sim/fg-home") ~ "/PropTree.xml", "/instrumentation/kma20");</code> | |||
In addition to debugging, there are other good reasons for doing a dump of portions of the property tree. | In addition to debugging, there are other good reasons for doing a dump of portions of the property tree. | ||
* [[Howto:Create_animation_XML_files_from_Nasal| Creating Animation XML files]] | * [[Howto:Create_animation_XML_files_from_Nasal|Creating Animation XML files]] | ||
* [[State Overlay System | * [[State Overlay System|Creating State Overlays for Aircraft]] | ||
== Reference documentation to the property tree == | == Reference documentation to the property tree == |
edits