Page 1 of 1

Beginner Tip: Always Set up Console

Posted: Tue Apr 30, 2024 8:20 pm
by Zach Mason 66293da0042da
If you just starting out with FreeFlyer scripting, you will have to test your code as you go. The main ways to test your code will be to output a value, plot your values, and output a viewwindow. The console gives you a way to neatly output values to do quick checks of data and verifications that your code is running correctly. It also can be a great way to output information if you a giving a presentation on your code. The console consolidates all the information so you don't have a bunch of report tabs open and can see information clearly from other sources. Note: don't use the console to output tables, it works best for reporting single values or comparing values. Copy and paste the below code into a FreeForm Script Element to quickly set up for console. Adjust as needed

// Console Setup
Console.DockMode = 3; //Console Location
Console.Dimension = 40; //Console size
Console.BackColor = ColorTools.Black; //Feel free to change the color
Console.CurrentTextColor = ColorTools.YellowGreen; //Feel free to change the color
Console.WindowTitle = "Insert name of code"; //change this
Console.WordWrap = 1;
Console.Show();

Report "This Mission Plan ...." to Console; //describe mission plan
Report " " to Console; //adds new line