January 16, 201214 yr I'm trying to draw a course line on a glass MFD gauge, knowingdesired track and distance to waypoint.I've got a fixed length line that shows the correct direction...How do I go about changing the "height" to a calculated variable,lets say a macro value?Would really appreciate some help with this! :( <Element id="GPS track to waypoint"> <FloatPosition>241.000,405.000</FloatPosition> <Visibility>@GPSWP</Visibility> <Rectangle id="Rectangle"> <LineWidth>1</LineWidth> <Bright>True</Bright> <Width>4</Width> <Height>120</Height> <LineColor>black</LineColor> <FillColor>magenta</FillColor> </Rectangle> <Rotation id="Rotation"> <Expression id="Expression"> <Script> @GPSROT 3.1416 + </Script> </Expression> </Rotation> </Element> Bert
January 16, 201214 yr Author Answering my own question... there is a HeightScript identifier which appears to work... so I hope I'm OK,but if there is a better way, please let me know! Edited January 16, 201214 yr by Bert Pieke Bert
January 17, 201214 yr Author ..and just in case anyone is trying to duplicate this, be aware that you can shortenthe rectangle by using the HeightScript identifier, but NOT lengthen it.. Bert
January 17, 201214 yr Moderator I assume that you tried this and it didn't work? <Height>@Height</Height> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
January 18, 201214 yr Hi, <Element> <Position X="540" Y="480"/> <Rectangle Width="2" Height="1600" Bright="Yes" Color="red"> <HeightCode>(L:segment0,nmiles) 5 * </HeightCode> </Rectangle> </Element> Gives satisfactory results for me. Edited May 6, 201511 yr by n4gix Jan "Beatus ille qui procul negotiis..."
January 18, 201214 yr Moderator Jan that works brilliantly for the FS9 XML schema. I wonder what the FSX XML schema equivalent would be? Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
January 24, 201214 yr Author This is what ended up working: <Rectangle id="Rectangle"> <LineWidth>1</LineWidth> <Bright>True</Bright> <Width>4</Width> <Height>400</Height> <HeightScript> ....calculations here </HeightScript> <LineColor>black</LineColor> <FillColor>magenta</FillColor> </Rectangle> Maximum length is 400 and when the calculations produce a number less than 400, the line is shortened. Edited May 6, 201511 yr by n4gix Bert
May 6, 201511 yr Moderator (* bump to top *) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment