Template:IO Restrictions: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 4: Line 4:


<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
#  come up with a path in $FG_HOME, inside the Export sub folder, file name is test.xml
#  come up with a path and filename in $FG_HOME, inside the Export sub folder, file name is test.xml
var path = getprop("/sim/fg-home") ~ "/Export/test.xml";
var filename = getprop("/sim/fg-home") ~ "/Export/test.xml";


# use the write_properties() helper in io.nas, which is a wrapper for the savexml fgcommand (see README.commands)
# use the write_properties() helper in io.nas, which is a wrapper for the savexml fgcommand (see README.commands)
io.write_properties(path, "/sim");
io.write_properties( path: filename, prop: "/sim" );
</syntaxhighlight>
</syntaxhighlight>


Navigation menu