April 21, 201115 yr Hi,Tested this one and it works flawless:<Macro Name="InvokeICAOInputMode">@1 (>@c:IcaoSearchInitialIcao) @2 (>@c:IcaoSearchStartCursor) @3 (>L:data entry,enum) 0 (>@c:IcaoSearchMatchedIcao)</Macro><Click>(L:rte,enum) 5 == <!--Page--> if{ (L:lsk L6,enum) 0 == <!--LSK--> if{ <--first push, start typing DEST-->1 (>L:lsk L6,enum) (L:data entry,enum) 1 == if{ -1 (>@c:IcaoSearchAdvanceCharacter) } @InvokeICAOInputMode((@c:FacilityICAO), 'AVNWM', 1,) quit } els{ (@c:FacilityICAO) (>@c:FlightPlanNewWaypointICAO) (@c:FlightPlanWaypointsNumber,number) 0 == <--second push, gives WPT 0 and DEST, start typing DEP-->if{ (>@c:FlightPlanDirectToDestination) 1 (>L:departure airport,number) } <!--Necessary L:Var-->els{ (L:departure airport,number) 1 == <--third push, DEP becomes WPT 0 and DEST is still WPT 1, start typing next WPT-->if{ 1 (>@c:FlightPlanAddWaypoint) 0 (>@c:FlightPlanDeleteWaypoint) 0 (>L:departure airport,number) } <--fourth push, brings next WPT between DEP and DEST, start typing next WPT etc. etc. EXEC light on-->els{ (@c:FlightPlanWaypointsNumber,number) 1 - (>@c:FlightPlanAddWaypoint) }} 0 (>@c:FlightPlanIsActiveWaypointLocked) -1 (>C:fs9gps:IcaoSearchBackupChar) -1 (>C:fs9gps:IcaoSearchBackupChar) -1 (>C:fs9gps:IcaoSearchBackupChar) -1 (>C:fs9gps:IcaoSearchBackupChar) -1 (>C:fs9gps:IcaoSearchBackupChar) 0 (>@c:IcaoSearchStopCursor) quit } } </ClickFinally exec button: 0 (>L:lsk L6,enum) and EXEC light goes off and typing becomes impossible.<Keys><On Key="AlphaNumeric"> <Visible>(L:data entry,enum) 1 ==</Visible> (M:Key) chr (>C:fs9gps:IcaoSearchEnterChar) </On></Keys>Jan Jan "Beatus ille qui procul negotiis..."
April 22, 201115 yr Hi Jan,Question - what happens if you were to omit 0 (>@c:IcaoSearchStopCursor) ?Bob
April 22, 201115 yr Ha,Nothing i noted, but it doesn't harm.I added also 0 (>@c:IcaoSearchMatchedIcao) behind it to faciltate the dupl wpts search.In the EXEC also 0 (>L:data entry 2,enum), was in the CLRbutton. Now we have to push it further: getting an "airwaydesignation" after entering 2 enclosing wpts. Is this one really read only?; will try.Jan Jan "Beatus ille qui procul negotiis..."
April 22, 201115 yr Now we have to push it further: getting an "airwaydesignation" after entering 2 enclosing wpts. Are you referring to FlightPlanWaypointAirwayIdent? If so, then you might have to deal with FlightPlanRouteType, which MSFT describes also as read only. It will be interesting to see how far you can take this.Thank you for posting this developing code.Bob
April 24, 201115 yr Author Commercial Member Jan,I've done this another way. I am too working with Boeing 767 Honeywell FMC and what I do is enter all the information (In the route page for example) such as the destination and departure - storing them in their own respective variables, and before they can be checked they're run through ICAO Search to makes sure I get a match and I filter out anything less than 4000' in length - and after I would click activate and whatever waypoints have been set in the particular route the execute button will make the first waypoint of the flight plan the departure airport - waypoint 0 - and the last the destination airport.See below: <Macro Name="EXECUTE"> <!--========================================RTE-1-RTE-SET========================================--> (L:FMC-RTE-1,enum) 1 >= if{ (L:FMC-RTE-1-ACT,enum) 0 == (L:FMC-RTE-1-READY,enum) 1 == (L:FMC-RTE-1-ACTIVATE,enum) 1 == and and if{ 'A' (>@c:IcaoSearchStartCursor) (L:FMC-RTE-ORGN-1,number) chr (L:FMC-RTE-ORGN-2,number) chr (L:FMC-RTE-ORGN-3,number) chr (L:FMC-RTE-ORGN-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar) (@c:IcaoSearchMatchedIcaosNumber) 1 == if{ (@c:IcaoSearchCurrentIcao) (>@c:FlightPlanNewWaypointICAO) } 0 (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointICAO) (@c:IcaoSearchCurrentIcao) scmp == if{ 0 (>@c:FlightPlanAddWaypoint) } 'A' (>@c:IcaoSearchStartCursor) (L:FMC-RTE-DEST-1,number) chr (L:FMC-RTE-DEST-2,number) chr (L:FMC-RTE-DEST-3,number) chr (L:FMC-RTE-DEST-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar) (@c:IcaoSearchMatchedIcaosNumber) 1 == if{ (@c:IcaoSearchCurrentICAO) (>@c:FlightPlanNewWaypointICAO) } (@c:FlightPlanWaypointsNumber) 1 - (>@c:FlightPlanWaypointIndex) (@c:FlightPlanWaypointICAO) (@c:IcaoSearchCurrentIcao) scmp == if{ (@c:FlightPlanWaypointsNumber) 1 + (>@c:FlightPlanAddWaypoint) } 1 (>L:FMC-RTE-1-ACT,enum) 0 (>L:FMC-RTE-1-ACTIVATE,enum) } quit } </Macro> FYI, I think your scratch pad is comprised of only the a GPS variable such as ICAOSearch. However, I have created my own scratchpad using LVars - 24 LVars as thats the limit on the GPS - and I can type whatever I want whenever. The LVars are numbers and I convert them using chr.Below I post the string I use to show the scratchpad and how I use the scratch pad in with the keyboard: <Element Name="TEXT-FIELD"><Position X="050" Y="235"/><Visible>(L:FMC-MSG-UNIT-1,number) 0 == (L:FMC-WPT-SEL,enum) 0 == and</Visible><FormattedText X="280" Y="230" Bright="Yes" Font="Calibri" FontSize="15" Adjust="Left" Color="%( (L:FMC-BRT,number) 0x7f + 0x100 * )%" LineSpacing="15" Tabs="15,25L,120C,265R,270R"><String>%((L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr (L:FMC-UNIT-5,number) chr (L:FMC-UNIT-6,number) chr (L:FMC-UNIT-7,number) chr (L:FMC-UNIT-8,number) chr (L:FMC-UNIT-9,number) chr (L:FMC-UNIT-10,number) chr (L:FMC-UNIT-11,number) chr (L:FMC-UNIT-12,number) chr (L:FMC-UNIT-13,number) chr (L:FMC-UNIT-14,number) chr (L:FMC-UNIT-15,number) chr (L:FMC-UNIT-16,number) chr (L:FMC-UNIT-17,number) chr (L:FMC-UNIT-18,number) chr (L:FMC-UNIT-19,number) chr (L:FMC-UNIT-20,number) chr (L:FMC-UNIT-21,number) chr (L:FMC-UNIT-22,number) chr (L:FMC-UNIT-23,number) chr (L:FMC-UNIT-24,number) chr scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat scat)%!s!</String></FormattedText> </Element> <On Key="AlphaNumeric"><Visible>(L:FMC-KEYBOARD-USE,bool) 1 ==</Visible> (L:FMC-UNIT-1,number) 0 == if{ (M:Key) (>L:FMC-UNIT-1,number) } els{ (L:FMC-UNIT-1,number) (L:FMC-UNIT-2,number) > (L:FMC-UNIT-2,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-2,number) } els{ (L:FMC-UNIT-2,number) (L:FMC-UNIT-3,number) > (L:FMC-UNIT-3,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-3,number) } els{ (L:FMC-UNIT-3,number) (L:FMC-UNIT-4,number) > (L:FMC-UNIT-4,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-4,number) } els{ (L:FMC-UNIT-4,number) (L:FMC-UNIT-5,number) > (L:FMC-UNIT-5,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-5,number) } els{ (L:FMC-UNIT-5,number) (L:FMC-UNIT-6,number) > (L:FMC-UNIT-6,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-6,number) } els{ (L:FMC-UNIT-6,number) (L:FMC-UNIT-7,number) > (L:FMC-UNIT-7,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-7,number) } els{ (L:FMC-UNIT-7,number) (L:FMC-UNIT-8,number) > (L:FMC-UNIT-8,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-8,number) } els{ (L:FMC-UNIT-8,number) (L:FMC-UNIT-9,number) > (L:FMC-UNIT-9,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-9,number) } els{ (L:FMC-UNIT-9,number) (L:FMC-UNIT-10,number) > (L:FMC-UNIT-10,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-10,number) } els{ (L:FMC-UNIT-10,number) (L:FMC-UNIT-11,number) > (L:FMC-UNIT-11,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-11,number) } els{ (L:FMC-UNIT-11,number) (L:FMC-UNIT-12,number) > (L:FMC-UNIT-12,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-12,number) } els{ (L:FMC-UNIT-12,number) (L:FMC-UNIT-13,number) > (L:FMC-UNIT-13,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-13,number) } els{ (L:FMC-UNIT-13,number) (L:FMC-UNIT-14,number) > (L:FMC-UNIT-14,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-14,number) } els{ (L:FMC-UNIT-14,number) (L:FMC-UNIT-15,number) > (L:FMC-UNIT-15,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-15,number) } els{ (L:FMC-UNIT-15,number) (L:FMC-UNIT-16,number) > (L:FMC-UNIT-16,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-16,number) } els{ (L:FMC-UNIT-16,number) (L:FMC-UNIT-17,number) > (L:FMC-UNIT-17,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-17,number) } els{ (L:FMC-UNIT-17,number) (L:FMC-UNIT-18,number) > (L:FMC-UNIT-18,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-18,number) } els{ (L:FMC-UNIT-18,number) (L:FMC-UNIT-19,number) > (L:FMC-UNIT-19,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-19,number) } els{ (L:FMC-UNIT-19,number) (L:FMC-UNIT-20,number) > (L:FMC-UNIT-20,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-20,number) } els{ (L:FMC-UNIT-20,number) (L:FMC-UNIT-21,number) > (L:FMC-UNIT-21,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-21,number) } els{ (L:FMC-UNIT-21,number) (L:FMC-UNIT-22,number) > (L:FMC-UNIT-22,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-22,number) } els{ (L:FMC-UNIT-22,number) (L:FMC-UNIT-23,number) > (L:FMC-UNIT-23,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-23,number) } els{ (L:FMC-UNIT-23,number) (L:FMC-UNIT-24,number) > (L:FMC-UNIT-24,number) 0 == and if{ (M:Key) (>L:FMC-UNIT-24,number) } } } } } } } } } } } } } } } } } } } } } } } }</On> You might get some use out of it.Keep em coming guys, love to read these active grand codes of sorts. :( Good Day, Engjell Berisha
April 24, 201115 yr I agree, Looks better, but for the time being functionality is nr.1, cosmetics next.Not so busy with fmc; more with fp and custom wpts on nd.Scratchpad shows 5 letters or cifers on the left and on the right simultaneously appear regions, names, index etc. so i can see wether i have the right waypoint.Jan Jan "Beatus ille qui procul negotiis..."
April 25, 201115 yr Btw.For what purpose do you need 24 characters; Namesearch?Jan Jan "Beatus ille qui procul negotiis..."
April 27, 201115 yr Author Commercial Member Btw.For what purpose do you need 24 characters; Namesearch?JanWell I made it 24 specifically because that's what the Honeywell FMC allows. So now I can type in the field whatever I wish. If I wanted to I would type "THIS IS A BOEING 767" for example. Although what I use it for in the FMC is setting the Latitudes and Longitudes in the Position page and setting all the parameters in the Route, Performance pages and so on. Also when adding waypoint to a flight plan - although this doesn't use all of the 24 obviously. Good Day, Engjell Berisha
April 27, 201115 yr I understand that, you could almost Twitter....Curious: you enter this with the keyboard.(Hate using it, only IcaoSearchEnterChar)How would it look when using the mouse and the fmc keyboard?Jan Jan "Beatus ille qui procul negotiis..."
April 27, 201115 yr Author Commercial Member I understand that, you could almost Twitter....Curious: you enter this with the keyboard.(Hate using it, only IcaoSearchEnterChar)How would it look when using the mouse and the fmc keyboard?JanNo I don't only have to use the keyboard. I just showed that one although I don't like to use the keyboard much either.Below is the click for the letter "A":<Area Left="155" Right="180" Top="345" Bottom="370"> <Tooltip>A</Tooltip> <Cursor Type="Hand"/> <Click> (L:FMC-UNIT-1,number) 0 == if{ 65 (>L:FMC-UNIT-1,number) } els{ (L:FMC-UNIT-1,number) (L:FMC-UNIT-2,number) > (L:FMC-UNIT-2,number) 0 == and if{ 65 (>L:FMC-UNIT-2,number) } els{ (L:FMC-UNIT-2,number) (L:FMC-UNIT-3,number) > (L:FMC-UNIT-3,number) 0 == and if{ 65 (>L:FMC-UNIT-3,number) } els{ (L:FMC-UNIT-3,number) (L:FMC-UNIT-4,number) > (L:FMC-UNIT-4,number) 0 == and if{ 65 (>L:FMC-UNIT-4,number) } els{ (L:FMC-UNIT-4,number) (L:FMC-UNIT-5,number) > (L:FMC-UNIT-5,number) 0 == and if{ 65 (>L:FMC-UNIT-5,number) } els{ (L:FMC-UNIT-5,number) (L:FMC-UNIT-6,number) > (L:FMC-UNIT-6,number) 0 == and if{ 65 (>L:FMC-UNIT-6,number) } els{ (L:FMC-UNIT-6,number) (L:FMC-UNIT-7,number) > (L:FMC-UNIT-7,number) 0 == and if{ 65 (>L:FMC-UNIT-7,number) } els{ (L:FMC-UNIT-7,number) (L:FMC-UNIT-8,number) > (L:FMC-UNIT-8,number) 0 == and if{ 65 (>L:FMC-UNIT-8,number) } els{ (L:FMC-UNIT-8,number) (L:FMC-UNIT-9,number) > (L:FMC-UNIT-9,number) 0 == and if{ 65 (>L:FMC-UNIT-9,number) } els{ (L:FMC-UNIT-9,number) (L:FMC-UNIT-10,number) > (L:FMC-UNIT-10,number) 0 == and if{ 65 (>L:FMC-UNIT-10,number) } els{ (L:FMC-UNIT-10,number) (L:FMC-UNIT-11,number) > (L:FMC-UNIT-11,number) 0 == and if{ 65 (>L:FMC-UNIT-11,number) } els{ (L:FMC-UNIT-11,number) (L:FMC-UNIT-12,number) > (L:FMC-UNIT-12,number) 0 == and if{ 65 (>L:FMC-UNIT-12,number) } els{ (L:FMC-UNIT-12,number) (L:FMC-UNIT-13,number) > (L:FMC-UNIT-13,number) 0 == and if{ 65 (>L:FMC-UNIT-13,number) } els{ (L:FMC-UNIT-13,number) (L:FMC-UNIT-14,number) > (L:FMC-UNIT-14,number) 0 == and if{ 65 (>L:FMC-UNIT-14,number) } els{ (L:FMC-UNIT-14,number) (L:FMC-UNIT-15,number) > (L:FMC-UNIT-15,number) 0 == and if{ 65 (>L:FMC-UNIT-15,number) } els{ (L:FMC-UNIT-15,number) (L:FMC-UNIT-16,number) > (L:FMC-UNIT-16,number) 0 == and if{ 65 (>L:FMC-UNIT-16,number) } els{ (L:FMC-UNIT-16,number) (L:FMC-UNIT-17,number) > (L:FMC-UNIT-17,number) 0 == and if{ 65 (>L:FMC-UNIT-17,number) } els{ (L:FMC-UNIT-17,number) (L:FMC-UNIT-18,number) > (L:FMC-UNIT-18,number) 0 == and if{ 65 (>L:FMC-UNIT-18,number) } els{ (L:FMC-UNIT-18,number) (L:FMC-UNIT-19,number) > (L:FMC-UNIT-19,number) 0 == and if{ 65 (>L:FMC-UNIT-19,number) } els{ (L:FMC-UNIT-19,number) (L:FMC-UNIT-20,number) > (L:FMC-UNIT-20,number) 0 == and if{ 65 (>L:FMC-UNIT-20,number) } els{ (L:FMC-UNIT-20,number) (L:FMC-UNIT-21,number) > (L:FMC-UNIT-21,number) 0 == and if{ 65 (>L:FMC-UNIT-21,number) } els{ (L:FMC-UNIT-21,number) (L:FMC-UNIT-22,number) > (L:FMC-UNIT-22,number) 0 == and if{ 65 (>L:FMC-UNIT-22,number) } els{ (L:FMC-UNIT-22,number) (L:FMC-UNIT-23,number) > (L:FMC-UNIT-23,number) 0 == and if{ 65 (>L:FMC-UNIT-23,number) } els{ (L:FMC-UNIT-23,number) (L:FMC-UNIT-24,number) > (L:FMC-UNIT-24,number) 0 == and if{ 65 (>L:FMC-UNIT-24,number) } } } } } } } } } } } } } } } } } } } } } } } }</Click> </Area> Hope that helps.The greatest part of all this is that it allows me to have my own navigation system independent from the GPS. And the key entry allows me to enter unique starting locations for the unit and it will align to the position you enter. Good Day, Engjell Berisha
April 29, 201115 yr Hi, Another question, the fmc becomes more intriguing (thought i was ready years ago...)I know how to use iceoenterchar to find a facility and also the keyboard chr scat way to send data back to icao to make a facility some waypoint or something else.But is it also possible to store a facility, found with iceosearch, into L:Var's? (and how)Say i type EHAM on the fmc keyboard and get Schiphol. How do i store this in L:Var's for later use? Never did that.Jan Jan "Beatus ille qui procul negotiis..."
April 29, 201115 yr Author Commercial Member Hi, Another question, the fmc becomes more intriguing (thought i was ready years ago...)I know how to use iceoenterchar to find a facility and also the keyboard chr scat way to send data back to icao to make a facility some waypoint or something else.But is it also possible to store a facility, found with iceosearch, into L:Var's? (and how)Say i type EHAM on the fmc keyboard and get Schiphol. How do i store this in L:Var's for later use? Never did that.JanHi Jan,This is also quite simple. What I've done is created special LVars to store ICAO's for things such as the Route page Origin airport or the Departure airport. Now one of the LSK's does this (LSK L1) by a click code. Here it is below: <!--========================================RTE-ORIGIN========================================--> (L:FMC-RTE-1,enum) 1 == if{ (L:FMC-UNIT-4,number) 64 > (L:FMC-UNIT-5,number) 0 == (L:FMC-RTE-ORGN,bool) 2 != and and if{ 'A' (>@c:IcaoSearchStartCursor) (L:FMC-UNIT-1,number) chr (L:FMC-UNIT-2,number) chr (L:FMC-UNIT-3,number) chr (L:FMC-UNIT-4,number) chr scat scat scat (>@c:IcaoSearchEnterChar) (@c:IcaoSearchMatchedIcaosNumber) 1 == if{ (L:FMC-UNIT-1,number) (>L:FMC-RTE-ORGN-1,number) (L:FMC-UNIT-2,number) (>L:FMC-RTE-ORGN-2,number) (L:FMC-UNIT-3,number) (>L:FMC-RTE-ORGN-3,number) (L:FMC-UNIT-4,number) (>L:FMC-RTE-ORGN-4,number) 1 (>L:FMC-RTE-ORGN,bool) 1 (>L:FMC-UNIT-EMPTY,bool) quit } els{ 1 (>L:FMC-NOT-IN-DATABASE,bool) } } els{ (L:FMC-RTE-ORGN,bool) 0 == if{ 1 (>L:FMC-INVALID-ENTRY,bool) } els{ (L:FMC-RTE-ORGN-1,number) (>L:FMC-UNIT-1,number) (L:FMC-RTE-ORGN-2,number) (>L:FMC-UNIT-2,number) (L:FMC-RTE-ORGN-3,number) (>L:FMC-UNIT-3,number) (L:FMC-RTE-ORGN-4,number) (>L:FMC-UNIT-4,number) } } quit } You see the code checks to make sure the airport is a ICAO match and if so then it will set it to the RTE ORGN Lvars.Hope that makes sense, and if it doesn't feel free to ask questions. :( Good Day, Engjell Berisha
April 29, 201115 yr Thanks.Was using that one already in another form.What i meant: you can set for example (A:PLANE LATITUDE,degrees) (>L:PLANE LATITUDE,degrees) and that works allright.But can this be achieved one way or the other: (@c:FacilityName) (>L:FacilityName,string)Btw., saw on your site you solved the custom waypoint symbols problem in the mfd. Congrats!Jan Jan "Beatus ille qui procul negotiis..."
April 30, 201115 yr Author Commercial Member Interesting question Jan. I don't know if this works - I don't think I've tried it - but I assume that it wouldn't as from what I know LVars cannot store strings. I may be wrong though, and in the event that I am that is great news for us all! I will give it a try as soon as I get back home tomorrow. Exciting stuff!Also I had figured out how to display custom images for an ND a while ago. I haven't gotten round to sharing the code yet though, but it is relatively simple. I just use some of the GPS variables to find the LAT/LON position of a WPT/VOR/ETC and then use the BGR/HDG to work out exactly where on a mathematical plane it is and from there I've created an XPOS Lvar and YPOS Lvar that will ultimatley position the images on the screen. The only difficulty have had so far is to define when the image not to display so that it does not go over the arc; the math for this is particularly difficult as you could imagine. I still have yet to work this out perfectly.We'll be in touch. Good Night for now. Good Day, Engjell Berisha
Create an account or sign in to comment