Page 1 of 1

Lua question: How to determine GUID

Posted: Sun Jan 03, 2016 5:02 am
by Rory Noonan
Wading a bit deeper into Lua... It seems like using the GUID would cut down a lot of repetitive typing work. How do I determine the GUID of a unit or reference point?

RE: Lua question: How to determine GUID

Posted: Sun Jan 03, 2016 9:40 am
by mx1
You can use GetUnit/GetReferencePoint function from the script console - example:

Code: Select all

 var = ScenEdit_GetReferencePoint({side='NATO',name='RP-2194'})
 print(var.guid)
 
 186a6e85-9be3-4a6b-96bb-32ea33db3c2d

or (for units only) go to menu 'Editor'->'SBR'-> 'Generate Template'. The saved XML file contains guids of all units in the scenario.


RE: Lua question: How to determine GUID

Posted: Sun Jan 03, 2016 10:13 am
by Rory Noonan
Fantastic. Thanks very much!!!