October 17, 200817 yr Moderator The following XML script will draw a lovely "pie element" from 210 degrees to 0 degrees (0 is the "points east" ending point.The SDK insists that adding StartAngleScript= to the command string will allow one to use a "script" to control the dynamics of the drawing, such as evaluating/scaling N1% for example.However, nothing I've tried seems to work. Has anyone ever gotten this working? <Element><Position X="506" Y="83"/><Pie Radius="41" StartAngle="210" EndAngle="0" LineWidth="2" LineColor="White" FillColor="#545454" Bright="Yes"/></Element> 210 degrees full scale / 100 percent = 2.1 scalar needed. <Pie Radius="41" StartAngle="210" StartAngleScript="%((A:TURB ENG CORRECTED N1:1,percent) 2.1 *)%!2d!%" EndAngle="0" LineWidth="2" LineColor="White" FillColor="#545454" Bright="Yes"/> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 19, 200817 yr Hey Bill,Try this:StartAngleScript="(A:TURB ENG CORRECTED N1:1,percent) 2.1 *"orStartAngleScript="((A:TURB ENG CORRECTED N1:1,percent) 2.1 *)"I don't think you need the percent signs and the fixed length formatting (which is probably turning your numeric value into a string). Tim http://fsandm.wordpress.com
October 19, 200817 yr Moderator StartAngleScript="(A:TURB ENG CORRECTED N1:1,percent) 2.1 *" or StartAngleScript="((A:TURB ENG CORRECTED N1:1,percent) 2.1>*)" I don't think you need the percent signs and the fixed length>formatting (which is probably turning your numeric value into>a string). I'll give it a try. At least it's a suggestion... ;) I've discovered that Pie and Arc actually DO work in FS9's XML syntax (which is a surprise to me!), but I hadn't gotten this part working yet. I know I could script in pure FSX XML schema, but I need to have something that will work in both sim versions. I did discover (the hard way of course) that LineColor doesn't work in FS9's schema. Color works fine though! <Polyline LineWidth="3" LineColor="#05BE1A" FillColor="Black" Bright="Yes">will have a WHITE Line... <Polyline LineWidth="3" Color="#05BE1A" FillColor="Black" Bright="Yes">will have a GREEN Line... :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 19, 200817 yr Moderator Well... This is a pity... The following will draw the initial StartAngle correctly, but it will never update... :(This is the final thing I need to accomplish somehow... <Pie Radius="41" StartAngle="(A:TURB ENG CORRECTED N1:1,percent)" EndAngle="0" LineWidth="2" Color="White" FillColor="#545454" Bright="Yes"> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 20, 200817 yr >Well... This is a pity... The following will draw the initial>StartAngle correctly, but it will never update... :(>>This is the final thing I need to accomplish somehow...>>FillColor="#545454" Bright="Yes">I could never make work in FS9...How did you do that? Unfortunately, the use of scripts in drawing vectors (line, pie,rectangle,etc both in FS9 and FSX) is limited to the starting point only, so it's not very useful IMHO. BTW, you should use TURB ENG N1 instead of the corrected value in engine gauges :-)Tom
October 20, 200817 yr Hi,This works, just a test, a workaround?:(A:general eng1 throttle lever position,part) 0.33 <(A:general eng1 throttle lever position,part)(A:general eng1 throttle lever position,part) 0.33 > (A:general eng1 throttle lever position,part) 0.66 < and(A:general eng1 throttle lever position,part)(A:general eng1 throttle lever position,part) 0.66 >(A:general eng1 throttle lever position,part)By testing you will see what i mean.Change Lines and Colours etc.Hope it helps,Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
October 20, 200817 yr Moderator Brilliant, Jan. If you can't rotate your pie, pie your rotates! :) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 21, 200817 yr Author Congratulations for doing a so nice display in XML, really amazing !!I am especially surprised by the curve drawn for the flight route.Eric My Web Site
August 18, 200916 yr Commercial Member Congratulations for doing a so nice display in XML, really amazing !!I am especially surprised by the curve drawn for the flight route.EricI know I'm really late on this topic, but is Eric right? In that did you indeed construct that display using XML? :( I've been trying for ages to figure out how to code just one of the features of your display, to no avail and you've constructed everything I've ever wanted to get out of a XML display.How'd you go about creating the climb/descend prediction bar (The green one, don't know the right term for it). How is it possible to change the display of Intersections, NDB's, VOR's, Airports, and runways the way you've done so in your display? :( :( Achieveing something anywhere near what you've achieved in your display has become my insparation, I've put it up on my desktop to be inspired to build it! B) B) Good Day, Engjell Berisha
August 18, 200916 yr Moderator NOTE: Since the forum software was updated last year, previously posted XML Script examples are being "hidden from view" unless they are wrapped in {CODE} tags. I've taken the liberty to respond to Jan's old post simply so I could resurrect his XML Script for everyone to see. There's nothing more annoying when searching for answers to find that because of age they've been "hidden from view!" :( Hi,This works, just a test, a workaround?: <Element> <Position X="100" Y="100"/> <Element> <Visible> (A:general eng1 throttle lever position,part) 0.33 < </Visible> <Pie Radius="50" StartAngle="360" EndAngle="270" LineWidth="2" Color="dkgray" FillColor="red" Bright="yes"> <Pivot X="51" Y="51"/> </Pie> <Rotate> <Value>(A:general eng1 throttle lever position,part)</Value> <Nonlinearity> <Item Value="0" X="50" Y="0"/> <Item Value="0.4" X="0" Y="50"/> </Nonlinearity> </Rotate> </Element> <Element> <Visible> (A:general eng1 throttle lever position,part) 0.33 > (A:general eng1 throttle lever position,part) 0.66 < and </Visible> <Pie Radius="50" StartAngle="360" EndAngle="180" LineWidth="2" Color="dkgray" FillColor="red" Bright="yes"> <Pivot X="51" Y="51"/> </Pie> <Rotate> <Value>(A:general eng1 throttle lever position,part)</Value> <Nonlinearity> <Item Value="0" X="50" Y="0"/> <Item Value="0.4" X="0" Y="50"/> </Nonlinearity> </Rotate> </Element> <Element> <Visible>(A:general eng1 throttle lever position,part) 0.66 ></Visible> <Pie Radius="50" StartAngle="360" EndAngle="90" LineWidth="2" Color="dkgray" FillColor="red" Bright="yes"> <Pivot X="51" Y="51"/> </Pie> <Rotate> <Value>(A:general eng1 throttle lever position,part)</Value> <Nonlinearity> <Item Value="0" X="50" Y="0"/> <Item Value="0.4" X="0" Y="50"/> </Nonlinearity> </Rotate> </Element> <Element> <Position X="0" Y="-50"/> <Polygon LineWidth="2" Color="dkgray" FillColor="green" Bright="yes"> <Point X="-30" Y="-1"/> <Point X="-1" Y="50"/> <Point X="50" Y="50"/> <Point X="50" Y="-1"/> <Point X="-30" Y="-1"/> </Polygon> </Element> </Element> By testing you will see what i mean.Change Lines and Colours etc.Hope it helps,Jan"Beatus ille qui procul negotiis..." Edited May 7, 201412 yr by n4gix Resurrect Jan's XML Script again! Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
August 18, 200916 yr Moderator I know I'm really late on this topic, but is Eric right? In that did you indeed construct that display using XML? :( I've been trying for ages to figure out how to code just one of the features of your display, to no avail and you've constructed everything I've ever wanted to get out of a XML display.How'd you go about creating the climb/descend prediction bar (The green one, don't know the right term for it). How is it possible to change the display of Intersections, NDB's, VOR's, Airports, and runways the way you've done so in your display? :( :( Achieveing something anywhere near what you've achieved in your display has become my insparation, I've put it up on my desktop to be inspired to build it! B) B)Yes, the entire display is XML script. It was one of the "gauges" I programmed under contract with ABACUS for their newest version of the B787.As for the "custom display" of VORs, NDBs, Intersections, et cetera one simply takes the returned Lat/Lon for each one and draws one's own graphic in lieu of having the default drawn.As for the VNav display, I never did manage to get it working properly. What's shown in the screenshot is a static view of the real display. I wound up simplifying it considerably for the final release version: Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
August 27, 200916 yr Commercial Member Bill would you be able to show me some example code on how to achieve this? I'm un-able to conceive how to do so. :( The main things I want to accomplish are to produce the following things:Coustom drawings/txt for the Intersections, VOR's, NDB's, and RWY's - I'm assuming you've tied this to an FMC as to select the departure/arrival runway and then show it on the ND.And another really usefull bit of code would be the vertical speed trend bar.I appreciate any/all the help you can provide me with! Good Day, Engjell Berisha
January 23, 201016 yr Commercial Member Anyone here know how this can be done?By this I mean using your own drawings for the symbols of waypoints and what not. Good Day, Engjell Berisha
January 23, 201016 yr Moderator The main things I want to accomplish are to produce the following things:Coustom drawings/txt for the Intersections, VOR's, NDB's, and RWY's - I'm assuming you've tied this to an FMC as to select the departure/arrival runway and then show it on the ND.Oh dear! I completely missed your question the first time around...In any event, what you see in the full panel for the nav data is default from the fs9gps.dll...There's an amazing variety of things you can do with the default symbols however.Yes, there's an FMC providing signals to drive the autopilot and the displays. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
January 27, 201016 yr Commercial Member Oh dear! I completely missed your question the first time around...In any event, what you see in the full panel for the nav data is default from the fs9gps.dll...There's an amazing variety of things you can do with the default symbols however.Yes, there's an FMC providing signals to drive the autopilot and the displays.How would I go about achieving what ever I want - what you did with the intersection symbols & runway & VOR - I know I can't edit the FS9GPS.dll, so I wonder what you did to achieve such a result in your display? I would assume you collected information from the module and then drew up the symbols - how would one do that, collect the information, then display the appropriate symbol in respect to the information...?I've been going crazy trying to figure something out from the default GPS's or somewhere online but I can't find anything that would even lead me in the right direction, everything I've come across so far seems to be limited to the default ugly runway blocks not like yours at all!I assume it would be troublesome for you to teach me exactly how to do it, but if you would just point me in the right direction?You had originally said: "As for the "custom display" of VORs, NDBs, Intersections, et cetera one simply takes the returned Lat/Lon for each one and draws one's own graphic in lieu of having the default drawn."This seems quite troublesome to me, I can not fathom how to take the LAT/LON for every intersection that is to be displayed within the range of the window a (In my case a min of 5NM and Max of 320NM) and neglect displaying the one that's there and display my own image... :( Good Day, Engjell Berisha
Archived
This topic is now archived and is closed to further replies.