777ipod Posted December 12, 2022 Report Posted December 12, 2022 I have been trying to get the screen data out off the dll using c# and .net6. I had some luck to get whole display text but I saw that there should be a option to get each screen cell with the flags color and font size type. But can't find out how to get to this data.
Paul Henty Posted December 12, 2022 Report Posted December 12, 2022 There are a number of ways to get the data from the CDU, depending on what level of detail you want. Here are the options: cdu0 = new PMDG_NGX_CDU_Screen(0x5400); cdu0.RefreshData(); // Entire screen this.txtCDU.Text = cdu0.ToString("\r\n"); // Individual Rows: string row3Text = cdu0.Rows[2].ToString(); // Rows are 0 based. Third row has index 2 // Individual Cells: // e.g. Character in Row 3 (Index 2), First Character (Index 0): char R3C1Char = cdu0.Rows[2].Cells[0].Symbol; // Same but as a string: string R3C1String = cdu0.Rows[2].Cells[0].ToString(); // Get cell colour: PMDG_NGX_CDU_COLOR R3C1Colour = cdu0.Rows[2].Cells[0].Color; // Get cell Flag: PMDG_NGX_CDU_FLAG R3C1Flags = cdu0.Rows[2].Cells[0].Flags; // Flags values can be combined (e.g. Small and Reversed). To check if a certain bit is set use the HasFlag method: bool cellIsReversed = R3C1Flags.HasFlag(PMDG_NGX_CDU_FLAG.REVERSE); Paul
777ipod Posted December 12, 2022 Author Report Posted December 12, 2022 Hi Paul, Thanks for your quick reply. This information was actually what I needed.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now