Mike,
I noticed the coloring of ScenEdit_ExportScenarioToXML() today, but not the statement at the top.
Also, I noticed that they put functions new to 1.14.2 at the top. Such statements are hard to maintain in the long run, and make for a large mess after several iterations or several releases.
I believe a simple statement with the function 'Available since version 1.???' when the function is added is more maintainable and more useful for the end user.
This works for deprication as well...
'Depricated since version 1.???'
Similar statements about license-version availability would be nice:
e.g. in ScenEdit_ExportScenarioToXML section..
Available to P.E. Full version and above.
If this site is intended for Base user consumption only, then please state that somewhere on the site. If that is the case, then additional site for the Professional Users should be developed to support them. These are my thoughts. I believe adding statements as described above is actually the easier solution.
All that said, I decided to test a few functions against my version (P.E. 1.14.2 Student Edition). Time permitting, I may work my way through all the functions and provide similar feedback. What I discovered is that some did not work, and some had omissions in the documentation. Below are my observations for that small set of functions:
Code: Select all
--works on PE, Student Version 1.14.2
local result = ScenEdit_InputBox("Enter the guid for the unit to target")
Code: Select all
--works on PE, Student Version 1.14.2
local result = ScenEdit_MsgBox('press a button...',5)
print(result)
--a note on the documentation for this function:
--RETURNS string with name of button pressed
-- e.g. 'Ok', 'Cancel', 'Abort', 'Retry', 'Ignore','Yes','No','Retry'
-- (not localized)
--the documentation says it returns the button number pressed (which is incorrect)
Code: Select all
--does NOT work on PE, Student Version 1.14.2
--PRODUCES ERROR: attempt to call global 'ScenEdit_SelectedUnits' (a nil value)
local units = ScenEdit_SelectedUnits()
print(units)
Code: Select all
--works on PE, Student Version 1.14.2
local vp = VP_GetSide({Side="USA"})
local cp = vp.contacts --List Of contactslocal
local contact = cp[1]
local cguid = cp[1].guid -- a specific contactlocal
local result = VP_GetContact({guid=cguid}) -- details of contact as distinct to unit details
print(result)
Code: Select all
--works on PE, Student Version 1.14.2
local result = VP_GetSide({Side ='USA'})
print(result)
Code: Select all
--does NOT work on PE, Student Version 1.14.2
--PRODUCES ERROR: attempt to call global 'VP_GetSides' (a nil value)
local sides = VP_GetSides()
print(sides)
Code: Select all
--works on PE, Student Version 1.14.2
local uData = VP_GetUnit({side='USA',name='USS BOXER (LHD-4)'})
print(uData)
Code: Select all
--works on PE, Student Version 1.14.2
--BUT...Documentation DOES not tell you to put in radius! (nor units of distance for radius)
local uData = VP_GetUnit({side='USA',name='USS BOXER (LHD-4)'})
local circle = World_GetCircleFromPoint(
{latitude=uData.latitude, longitude=uData.longitude, numpoints=20, radius=50})
print(circle)
Code: Select all
--works on PE, Student Version 1.14.2
--BUT... a description of location wrapper not anywhere in the documentation..
local elv = World_GetElevation({latitude='15.1429', longitude='120.3496'})
print(elv)
Code: Select all
--does NOT work on PE, Student Version 1.14.2
--PRODUCES ERROR: attempt to call global 'World_GetLocation' (a nil value)
local loc = World_GetLocation({latitude='15.1429', longitude='120.3496'})
print(loc)
Code: Select all
--works on PE, Student Version 1.14.2
--BUT... parameters needed are not clearly specified in documentation
--(bearing and distance left out)
--nor units of measure for distance. Miles, KM? NM?
--To work, the function requires table with the following information:
--{latitude=start_lat, longidude=start_lon, bearing=number, distance=number}
--
--Also, UNLIKE Tool_Brearing function you MUST use lat and lon for start position, not a unit.
--
local newPoint = World_GetPointFromBearing(
{latitude='15.1429', longitude='120.3496', bearing=45, distance=50})
print(newPoint)
local uData = VP_GetUnit({side='USA',name='USS BOXER (LHD-4)'})
local newPoint = World_GetPointFromBearing(
{latitude=uData.latitude, longitude=uData.longitude, bearing=45, distance=50})
print(newPoint)
[:)]