Jump to content

GetShortName

From CMM Wiki
Revision as of 10:11, 11 November 2025 by Ozdeadmeat (talk | contribs) (GetShortName – created via PowerShell script (2025-11-11T21:11:58Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetShortName
Function Description: Returns a concise "short" display name for a DCS object or type; accepts either an object table (e.g., Unit, Weapon) or the type name string. The function looks up the supplied key in CMM.OBJECTS and CMM.WEAPONS and returns the DisplayNameShort field if present, otherwise it falls back to the original type name.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.GetShortName( table or string obj )
Return Value: string
Parameters: Name Description
objObject table or type name string to query.
Example: env.info("Short name: "..tostring(CMM.GetShortName(unit)))
Example Description: Shows how to obtain a compact identifier for a unit by passing the unit instance to CMM.GetShortName.
Related Functions:
Notes: