FS2020 Aircraft Name

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

FS2020 Aircraft Name

#1 Post by The Artful Dodger »

Hello:
I was just wondering if there was a Sim Variable with the name of the aircraft currently being flown? I have searched for everything I could think of to no avail!

Thanks in advance.

Sparky

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: FS2020 Aircraft Name

#2 Post by Sling »

Completely from memory. Let me know if it doesn’t work and I’ll go check it.

“TITLE”, “String”

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: FS2020 Aircraft Name

#3 Post by jph »

perhaps atc_type and or atc_model ?
https://docs.flightsimulator.com/html/C ... nition.htm
That was the first thing that came up on a google search using the terms "fs2020 aircraft name variables"
I do not have the game so I have no idea if they will work or how to use them.
Joe. CISSP, MSc.

The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

Re: FS2020 Aircraft Name

#4 Post by The Artful Dodger »

WOW!! Both of you are absolutely spot on! I spent a long time searching for "aircraft.." and "airplane..." but I was searching in the variable list, not Google! Well, that solves a big problem for me and I thank you for your help and for taking the time to answer! :)

Kind regards,

Sparky

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: FS2020 Aircraft Name

#5 Post by jph »

Nice one. Hope it works out Sparky.
Post the results as it will be useful for someone else in the future I am sure.
Joe. CISSP, MSc.

The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

Re: FS2020 Aircraft Name

#6 Post by The Artful Dodger »

Hello, jph:
I'm sorry to bother you again but you asked me to "post the results" but I don't know what that means or entails. Please come to my rescue again and explain!

Thanks in Advance,

Sparky

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: FS2020 Aircraft Name

#7 Post by jph »

Hi Sparky,
all I mean is that when you get a bit of working code that uses the aircraft name then simply put a minimal example of the piece of code that works for you to use the aircraft name in AM - in a reply to this thread then anyone looking in the future via the search on the forums can see an example.
you can use the 'code display' button to put the code inside an easily removeable box as in -

Code: Select all

hello world here is my code

:D
Joe. CISSP, MSc.

SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: FS2020 Aircraft Name

#8 Post by SimPassion »

Hi Sparky @The Artful Dodger

as mentioned by Joe, we should get something like this :

Code: Select all

function pr_acfid(acf_desc)
	if (acf_desc == nil) then
		return
	end
	print("ACF Check : "..acf_desc)
end

-- MSFS 2020
fs2020_variable_subscribe("TITLE", "STRING", pr_acfid)

-- X-Plane
xpl_dataref_subscribe("sim/aircraft/view/acf_descrip", "STRING",
						pr_acfid)

Post Reply