• 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.

Tip: How to mass edit the Library Objects category

Messages
3,346
Country
germany
I had the need in the project I am currently working on to categorize library objects from different bgls into groups. All pre-defined objects and all that you import are automatically assigned with the Category "Stock". You can change that in the dialog on a per-object base, but that is pretty hopeless task when you have thousands of objects. Since I really needed it I was looking how this could be achieved otherwise and have come up with this method.

NOTE: this method is neither forseen nor supported - so please stay away from it if you don't feel completely secure with what you are doing. And always create a backup first!!!

The objects are all contained in the files "adeObjectList.dat" in each of the FS-version related folders (FS9/FSX/P3D/P32/P33). This file is created the first time you import a library into the library manager.

This file is a delimited text file with 12 columns. The delimiter is the character "|". The relevant columns for this task are:

1. GUID
2. Object Name
3. Category (the one we want to change)
4. Library file name with extension
5.-12. don't mess with these(!)

I noticed that the objects in the list are not necessarily sorted per library (depending on the object name).
So first we want to sort the whole thing. This is a bit tricky. I recommend the free CSV Editor UniCSVEd for this. Is a fantastic tool whenever it comes to work with delimited files.

Now that you have the list sorted by library, you can edit it in your favorite text editor (I use PSPad since years). Open the file "adeObjectList.dat" and work through it by this approach:

1. Find the library where you want to change the category for (e.g. 2D Ground Crew_FSX.bgl)
Code:
7ba62ed2-4da0-28e8-904b-b2ab400dae9f|2D Ground Crew37|Stock|2D Ground Crew_FSX.BGL||0|0.000|1.310|0.000|-0.656|0.000|0.656
7ba62ed2-4da0-28e8-904b-b2ab390dae9f|2D Ground Crew36|Stock|2D Ground Crew_FSX.BGL||0|0.000|1.720|0.000|-0.861|0.000|0.861
7ba62ed2-4da0-28e8-904b-b2ab350dae9f|2D Ground Crew35|Stock|2D Ground Crew_FSX.BGL||0|0.000|0.560|0.000|-0.280|0.000|0.281
7ba62ed2-4da0-28e8-904b-b2ab340dae9f|2D Ground Crew34|Stock|2D Ground Crew_FSX.BGL||0|0.000|0.740|0.000|-0.369|0.000|0.370
2. Copy the part category and library name including the first and last delimiter to the clipboard (here that would be: |Stock|2D Ground Crew_FSX.BGL|
3. Press Ctrl-H (or whatever the search and replace shortcut is)
4. Insert |Stock|2D Ground Crew_FSX.BGL| as the text to be replace and also as the new text. Then overwrite "Stock" with your new category name and proceed with replace all.

What happens is that only for the library in question the category is changed from "Stock" to your wanted value.

You can work through the list which is still some work, but a hell of a lot faster than doing it object per object.

AGAIN: Create a backup first!!!
 
Messages
435
Country
us-newyork
Wow, great idea. One can also use MS Excel to open the delimited file, columize, sort and edit. Then save as CSV and use Notepad++ to change the delimiter from comma back to the original. Obviously, one should backup any original files.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,841
Country
unitedkingdom
Thanks Martin. I have stickied this for a while and will move it later to the Tips, Tricks and Tutorials section
 
Top