October 8, 200817 yr I think I know the answer (crap!), but just in case...Is there any way to call or insert or whatever a poly that repeats many times, over and over again, outside of the element in which it's originally defined?What I mean is, say I build some kind of polygon, composed of 10 points, some place up above in the gauge, maybe 5 element layers in. Is there any way to call that original polygon down below, from within different elements? This would be great, as I'm currently working on something where the same "image" poly is needed in many places (and they must be in different elements)... and my goodness would such a feature make the code more readable and maintainable!! Avoiding all those point re-definitions would cut my gauge length in half!I know macros are merely literal replacements of text, so that's a no go, until they support an as a child. Is there any other way to accomplish this, like maybe a mysterious and mostly unknown tag? It would be undocumented, or course, like so many features are, and I don't see such a thing in any default gauges, but then again there's no particular need for it in any of the default gauges...The answer to "does it exist" is "no way," isn't it? ;-)Microsoft, if you're reading, and if XML is, as stated, going to be expanded and be the way of the future, such capability would be a wonderful addition... and could you please make it available even beyond polygons, please? Heheh. Just dreaming here I guess... I love some of the new additions and detail in FSX-style XML, but miss the efficiency and brevity of the FS9-style.
October 8, 200817 yr Author Moderator There is no way that I'm aware of...For the future, spend some time studying Lua (http://lua.org). It should make its debut entry in TrainSim 2's release. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 30, 200817 yr I've been on a Lu(au) since I saw your first post about it. It's a very handy little language. Not much of an API behind it though. Hopefully, the entire SDK will be aggregated into a library which can be called in Lua - that'll be the day. Jeff Bea I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.
October 30, 200817 yr Hi,What is the form of the polygon?Sometimes you can mimic it with some text or symbol; then you can use the macro.Jan"Beatus ille qui procul negotiis..." Jan "Beatus ille qui procul negotiis..."
October 30, 200817 yr Author Moderator I've never experimented with the "goto" in XML scripting, so I honestly don't know whether this would work, but...If your or :(g0...gn Goto label. Execution will jump to the specified label. Labels are set by entering a colon followed by the label number. Shoot... :-bang Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
October 30, 200817 yr >>The answer to "does it exist" is "no way," isn't it? ;-)>Yes, and I'm afraid it will always be "no way" in any script-dependant "language", using XML, LUA or other platform alike.You need a true function to acomplish that, and that's what C/C++ was invented for !! ;-)Tom
Create an account or sign in to comment