• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Manually adding scenery to the library in Code

Messages
29
Country
england
Hello,

I am writing an installer for some scenery that I have created and I need to know how to manually add scenery to the library in code when the scenery is installing so the user doesn't have to add it manually.

I simply need to know the method of manually adding scenery to the library (ie, not using the Add Scenery... in FSX settings) and I will be able to code up the function.


Thanks in advance,

Steve
 
I think you would need to modify the user's scenery.cfg file to add an entry for your scenery. As it is a text file that would not be terribly difficult. However there is an issue that many users would not want that file changed. The other way would be to add your scenery into Addon Scenery. That should always be activated so you would not need to modify scenery.cfg. Maybe give users an option?
 
Thanks for the reply :).

The will give the user the option for the installer to add it or for them to do it. The scener.cfg file is an ini file in terms of layout so it will be very easy to add another entry on the end.

I tried adding my scenery location but it didn't seem to regster it in the scenery library in FSX...

Any ideas?


Steve
 
Which scenery.cfg file are you modifying? Don't change the one in the flight sim execution directory, that's the default config file and is only used to rebuild the user specific config file if it doesn't exist. You want to modify the one that is somewhere under c:\Users\USERALIAS\...
 
You also need to be careful with gaps in both areas and layers in the existing cfg.
 
Solution to "Cannot add scenery"

It seems that quite a few people are having problems installing additional scenery with FSX and 64-bit versions of Vista and/or Windows 7

In my case I was trying to add Ants Aussie Airports. The folder was correctly named and located under the Addon Scenery folder, and contained the correct Scenery and Texture folders and files. But no matter what I tried, nothing worked. In the Add Area dialog, pressing the OK button just blanked out the directory name and did nothing.

So the only solution was to edit the scenery.cfg file.

Under Windows 7 there are two FSX file locations for "user data"
1) C:\ProgramData\Microsoft\FSX
2) C:\Users\Robert\AppData\Roaming\Microsoft\FSX
In this case the the scenery.cfg file is in the first location

Save a copy!!!
And then edit it. The last bit of the file looked like this

[Area.137]
Title=FTXAA_HOLGERMESH
Local=ORBX\FTX_AU\FTXAA_HOLGERMESH
Layer=137
Active=TRUE
Required=FALSE

[Area.138]
Title=OZx_AUS
Local=OZx\OZx_AUS
Layer=138
Active=TRUE
Required=FALSE

I just added another section like this, making sure that the new section had the next available area and layer numbers. The last entry will have the highest area number. Use that number+1 for both area and layer. Because the layer number for the added area will be the highest in the file, it will appear at the top of the list. It is a lot easier to simply put the new entry at the top, and then let the Add Scenery widget adjust all the layer numbers later.

[Area.137]
Title=FTXAA_HOLGERMESH
Local=ORBX\FTX_AU\FTXAA_HOLGERMESH
Layer=137
Active=TRUE
Required=FALSE

[Area.138]
Title=OZx_AUS
Local=OZx\OZx_AUS
Layer=138
Active=TRUE
Required=FALSE

[Area.139]
Title=Ants Aussie Airports
Local=Addon Scenery\Ants Aussie Airports
Layer=139
Active=TRUE
Required=FALSE

Saved.
Fired up FSX and into Settings > Scenery library and there it was. Sitting at the top of the list. I then moved it down to its correct position.

So, a very satisfied flyer.

No idea why the FSX widget wouldn't do its job. It's only a simple edit of a text file.

Hope this helps.
 
Hello,
I am also having this same problem with FSX and Windows7 64bit.
BluePrint Simulations doesn't automatically activate their airport scenery and want the user to do that manually.
I did what you said here, but didn't see the scenery in the library list like you did, so I clicked on "Add Scenery" and typed "BluePrint Simulations\KMEM" in the path box and "KMEM" in the title box.
This worked and the scenery is now activated in the library and works in FSX, but the title is blank in the library and if I want to see what scenery it is, I have to click on "Edit".
When I looked at the Scenery.cfg file in the Roaming\Microsoft\FSX folder, I didn't see any of my sceneries, which already work from being automatically activated by the installation, listed.
Are these actually in this or another folder? I would like to be able to see the titles in the scenery library.

Thank you,
Bob
 
[FSX] Adding scenery with Win7 64-bit

I'm now writing my own "Scenery Library" tool specifically for FSX and Win7 64-bit.

The only problem I am having is how to programatically locate the "scenery.cfg" file.

On my install it is in C:\ProgramData\Microsoft\FSX but it would seem that it could also be in C:\Users\<username>\AppData\Roaming\Microsoft\FSX or even somewhere else.

So, how does FSX find it?

Is there a call to SHGetFolderPath()? If so, what is the CSLID?

I note that some vendors (for example ORBX) do modify the scenery.cfg file as part of the installation, while others (eg Ants Aussie Airports) do not modify the file, and ask the user to add them using the scenery library
 
It seems that quite a few people are having problems installing additional scenery with FSX and 64-bit versions of Vista and/or Windows 7

In my case I was trying to add Ants Aussie Airports. The folder was correctly named and located under the Addon Scenery folder, and contained the correct Scenery and Texture folders and files. But no matter what I tried, nothing worked. In the Add Area dialog, pressing the OK button just blanked out the directory name and did nothing.

So the only solution was to edit the scenery.cfg file.

Did you try the steps outlined here?

http://aussiex.org/forum/index.php?showtopic=4426

Win7 is a bit obtuse when it comes to adding scenery entries.
 
Those steps work and are the only way to add scenery in Windows 7 64 bit. In fact I noticed that even FS2004 on Win7 64-bit has the same problem, I believe it has something to do with the Win7 video driver model. Unfortunately ACES nor MS are here to fix this annoying bug.
 
This is an old thread, I know, but recently active, so I'll carry on here.

I am trying to code an automatic scenery.cfg entry, using NSIS, but I just need to check on the 'rules' of scenery.cfg.

My understanding is that Area numbers need to be sequential, but Layer numbers needn't be?
 
My understanding is that Area numbers need to be sequential, but Layer numbers needn't be?

True. Area numbers are just the order that the entries have been added to the file. Layer numbers dictate priority of display and are just a field in the area number entry.
 
Back
Top