- Messages
- 3,353
- Country
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)
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!!!
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
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!!!