View Full Version : Subscript Out Of Range Error
gonpostal
08-26-2002, 03:58 PM
Hi, could someone tell me the proper way to change the size of an API macro? The macro I want to use has a suggested scale of between 0.10 an 0.20. If I try to change the scale from the default setting of 1.00 I get the error message "Runtime 9 Error - Subscript Out Of Range. I am using build 155 and am designing my scenery for FS2002. Any help would be appreciated. Thanks.
Jaybird
08-27-2002, 01:30 AM
Hello Pat.. If the (recommended scale 0.1 to 0.2) macro is one that wasn't part of the Apt26 download, I'm not totally sure but you may be able to pre-edit the scale and call it into Apt using the <Create 3D Object/User API> method.
Keep in mind that changing the scale to 1.0 when it was recommended that 0.2 be the maximum is a HUGE change and the interface may possibly rebel if you're controlling the scale in the %4 parameter box of Apt's create 3D object window. 'Not sure what's happening but it's possible that the large increase in scale is telling Apt to draw a locator symbol larger than that compatible with the interface's "draw airport symbol" (internal) code instructions. If you pre-edit the macro's scale and avoid the %4 box, then Apt does not try to draw a symbol proportional to the scale size entered in %4.
To try pre-editing the macro's scale all you need to do is open it in notepad or a similar text editor and change the scale value in the "RefPoint(" line of the macro's code. In the below example, it's the 3rd. element in the line (the "1").
i.e.: "RefPoint( 2 :TagPoly 1 38:58.19275 -089:5.07623 E= 142 V1= 5000 V2= 480 )".
At least one other possibility exists: If the macro already contains (or you manually edit) the location the object is intended to be placed in the scenery (Lat/Lon, elevation, heading, etc), you can compile the macro into a seperate *.bgl and put the bgl into your scenery folder along with the one created by Apt26.
Again, going from 0.2 to 1.0 is a big change but you "Might" get it to work "manually". Also, you might mention what type of scenery object the macro is intended to create...
Good Luck...
thiscox
09-02-2002, 12:12 PM
You should be able to change the scale to a decimal without problem. Where exactly are you entering the 0.10? Into which field? I will check the program and try to correct the error. Also, please email the offending API file to the support address at: support@airportforwindows.com
Tom
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.