1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating a library for use with Rwy12

Discussion in 'Library Creator XML' started by flyinmaninmn33, 11/5/06.

  1. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    I am writing because I need to know how to do something. I have your library creator XML program installed and I have some vehicles that someone made for me kindly. The problem is that I do not have an XML file for them which the program NEEDS in order to put the object into the Rwy12 object placer. I really wish we didnt need these dumb files. Anyways, your tutorial on the program says that your program can automatically generate an XML file but does not tell you HOW to do it. Thats what I need to know. I dont have an XML file for three vehicles and I need them. If you could tell me how your program is supposed to automatically generate an XML file for me, it would be great. I see how they are supposed to be writen in the Rwy12 Obj Placer, something like this:

    <?xml version="1.0" encoding="utf-8" ?>
    <objectsLibrary>
    <category name="Static Helicopters - M. Allen Richards">

    <obj name="Bell 206B"
    guid="1CC94D3744AE4A392D93F88FBF30AB7F"
    image="Static Helicopters\static 206b.jpg"/>

    </category>
    </objectsLibrary>

    what I have done is copied this from the library but deleted the category name and added the vehicle I was adding and changed the GUID and the location for the image. Any reasons to why this doesnt work for me? This doesnt look all that hard to write so why am I having a hard time with it?

    Thank you
    Lee
  2. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    On my next try at trying to run the BGLComp tool to generate a BGL file this is the error message that I get:

    C:\Program Files\SceneryDesign.org\Library Creator XML>bglcomp compile.xml

    Parsing document: compile.xml

    ERROR C2033: XML Parse Error (line, column, error)

    ERROR: 2, 16, The element 'objectsLibrary' is used but not declared in the DTD/Schema.

    ERROR C2309: objectsLibrary is NOT a valid token!
    ERROR C2016: Invalid element found <objectsLibrary>, skipping!
    ERROR C2032: XML Parse Error! Element tree follows:

    ERROR:
    ERROR C2033: XML Parse Error (line, column, error)

    ERROR: 3, 40, The element 'category' is used but not declared in the DTD/Schema.

    ERROR C2309: category is NOT a valid token!
    ERROR C2016: Invalid element found <category>, skipping!
    ERROR C2032: XML Parse Error! Element tree follows:

    ERROR:
    ERROR C2033: XML Parse Error (line, column, error)

    ERROR: 4, 127, The element 'obj' is used but not declared in the DTD/Schema.

    ERROR C2309: obj is NOT a valid token!
    ERROR C2016: Invalid element found <obj>, skipping!
    ERROR C2032: XML Parse Error! Element tree follows:

    ERROR:
    ERROR C2309: obj is NOT a valid token!
    ERROR C2023: Improper ending element <obj>. Stopping!
    ERROR C2034: XML Parse Fatal Error (line, column, error)

    ERROR: 4, 127, Unspecified error

    ERROR C2470: Unrecoverable error parsing XML!
    ERROR C2006: Parse failed (0x80004005)
    ERROR C2003: Failed to process file: compile.xml

    Anybody know whats wrong? I tried to write the xml file by copying an already written file and just changing the file name, GUID to the number that the program generates. Maybe something is wrong on how I save the file. When I save the file, I go to File, Save As..., I type in the file followed by .xml in the file name, I choose ALL FILES to save as, but then the save as file type, you have four choices are: ANSI, Unicode, Unicode Big endian, or UTF-8. Which one do I save the file as? Maybe its how I save the file that may be wrong. Let me know.

    Thanks,
    Lee
  3. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    I think you are mixing two things here. Library Creator XML has been designed mainly to create an object library BGL for FS. To do this it creates a BGLComp XML source file for you and using this XML file the BGL can be made.

    The other thing is that once you have created your library in Library Creator XML, the tool is also able to export the files needed to use your library in Rwy12. This will create another XML file that Rwy12 can read. So be very careful, these two XML files are not the same and can not be mixed.

    Here are the steps that you would normally take to create a library BGL from your MDL scenery objects and then use them in Rwy12:

    1. Create a new library XML in Library Creator XML, you will be asked to specify the name and location of this XML file.
    2. Add your MDL objects to this object library. They will be given a GUID automatically by Library Creator XML.
    3. Once you have added all your objects, you can compile the BGL file for use in FS. BGLComp will be used for this (but Library Creator will do the hard work for you).
    4. Now you have a BGL file that contains your objects and you can use it in FS. If you would write your own XML placement file you could already place the objects. The next steps allow you to use your new library for Rwy12 as well.
    5. With your library XML still loaded in Library Creator XML, you need to select the Rwy12 export option from the Export menu.
    6. You will be asked to specify where to place this new XML file (default location is in the Rwy12 folder).
    7. Once this new file has been created, you should be able to use it in Rwy12.
  4. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    In regards to your step by step instructions, Number 1, HOW do I create that XML file from the new xml option in the file menu? I dont have one and your program is supposed to generate one like the example I displayed above. The last one, Number 6 says that you need to export, when I go and try that I get an error message and the whole program just shuts down after I click OK. Something is wrong, can I e-mail you the files, can you compile them for me to use in Rwy12?

    Let me know.

    Thanks
    Lee
  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    "File" menu, option "New XML". Then you get a file browser dialog where you can enter the name and location of your new XML file. A logical place to store your library source is together with the MDL objects you try to put in it.

    Also I want to note once again that the XML file created at this step is not the one you posted the example of above. This the BGLComp source XML, while the sample you posted is of the Rwy12 XML file. That one is created in step 5.

    What does the error message say? That would help in solving it I guess. You should get a new form, where you can enter the Rwy12 information.

    I don't have Rwy12 installed at my PC at the moment, so I am not sure if I would be able to create some working Rwy12 files for you here.
  6. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    The exact message that I get when trying to export is:

    Run-Time error '52':
    Bad File name or number

    When I click OK the whole Library creator XML program just terminates and Im not sure where the error is. Here is the path that I specified:

    In the first line where it asks for the location of the Rwy12 XML file this is the path that I specify:

    C:/rwy12_program_v1.2/rwy12_program_v1.2/rwy12 Object Placer v1.2/rwy12

    or I try it with back slashes:

    C:\rwy12_program_v1.2\rwy12_program_v1.2\rwy12 Object Placer v1.2\rwy12

    Im assuming that the first path is asking where your main rwy12 XML files are located and that is where they ARE located.

    The second path asks where your rwy 12 IMG folder is located, again I input the same patha s above except that after the rwy12 I put IMG like this:

    C:\rwy12_program_v1.2\rwy12_program_v1.2\rwy12 Object Placer v1.2\rwy12\img

    that IS where the images are stored. Finally the third path asks for your library description which I assume is what I want to appear in the library drop down menu. I just put the name of my object. Now, after entering all 3 I push the button to Create XML and that is where the box with that error message comes up:

    Run-Time error '52':
    Bad File name or number

    and then I press OK and thats when the program just shuts down. Whats the problem here? Please help.

    Lee
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    As you can see in the Library Creator XML manual, you need to specify the file name of your Rwy12 XML file, not only the path. The second both only gives the folder name for the images (relative to the location of your XML). And in the third box you can enter a understandable name for your library. See the image from the manual that I attached.

    I guess I need to check if the input is validated correctly, as the crash is probably due to information entered incorrectly. It should not kill the entire program of course.

    Attached Files:

  8. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Well, we're getting closer to a resolution. I have one more question the xml that the program generated is slightly different from the other ones that are already in the library. Here's the one that generated for me:

    <objectsLibrary><category name="add_ford_taurus_01"><obj name="Ford_Taurus_01" guid="7E50C6E0EC714E46A3CC36917CBF01BD" image="add_ford_taurus_01\Ford_Taurus_01.jpg"/></category></objectsLibrary>

    that's exactly the way it looks too, scrunched together on 3 lines. NOW, heres one of the xml files from the library already there:

    <?xml version="1.0" encoding="utf-8" ?>
    <objectsLibrary>
    <category name="Static Helicopters - M. Allen Richards">

    <obj name="Bell 206B"
    guid="1CC94D3744AE4A392D93F88FBF30AB7F"
    image="Static Helicopters\static 206b.jpg"/>

    </category>
    </objectsLibrary>

    They are different, aren't they? The car that the first xml file is written for shows up in the Rwy12 library menu and all but when I go to place it in the simulator, for instance I placed the car on the runway at Seattle and I have it in a folder called Seattle Objects just for testing purposes and inside that folder there is a folder called scenery where inside that folder is the BGL and the XML file that was created in the Rwy12 placement. Now, the problem is that when I go back from exiting the simulator, the car is NOT on the runway where I placed it. I know that all files were probably written ok because I didnt see any errors. Can you possibly tell me why it is not showing up in my sim? The folder IS activated within the scenery menu.

    Thanks,
    Lee
    Last edited: 13/5/06
  9. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    No, the files are the same, only the layout of the text file is different. Both should work fine.

    Are you sure you have the library BGL of your cars in an active scenery folder as well? A good place would be to put it together with all the other Rwy12 libraries.
  10. Joe W

    Joe W

    Joined:
    3/6/04
    Messages:
    256
    Country:
    unitedstates
    I'm getting the "run time error" too. I have tryed everything including the RWY12 folder and a dummy RWY12 folder in the gamx objects folder. Everytime I try to make the rwy12 file it crashes and I have to load it again.
    Joe W.

    Ok.... I went to the rwy12 folder and made the necessary folders for this library in the img folder and the rwy12 folder so that it will reference it back
    Sorry for being so dense....
    Joe W.
    Last edited: 15/6/06
  11. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Joe,

    Thanks for reporting anyway. Library Creator XML should create the image folder for you, if it is not there, but apparantly that is not working all the time. I will check the code and the manual to see if things are incorrect or unclear there.
  12. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    I tried compiling the XML file for the car that I wanted to and after reading your example, I printed the thumbnail and followed the directions but when I exported the last XML file, I cant seem to find where it was exported to. Its not in any of the Rwy12 folders. Where is it? I need it to place the objects in FS

    Thanks,
    Lee
  13. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    I assume you mean the XML file for Rwy12? It should be created in the folder that you specified on the form when you exported it.
  14. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    In your example above where you gave the thumbnail image I followed that right as you said. I located the xml file within the Rwy12 folder (the one that is created when you generate the xml file) and went through and compiled a BGL file, all is okay there, no error messages. I then went to export the car to a Rwy12 file and went through to locate that xml file that was created before, that went okay and then the button that says "Generate XML" I pushed it and the dialog box just disappeared, no errors, nothing, I went to try and find the newely created XML file but no luck. I checked in all the folders within Rwy12 but could only find the xml created earlier, the one you had said wouldn't work as a placement file for objects. This is really getting frustrating. I keep having people make cars and such but it seems like a waste of time if I cannot even place them in the scenery or worse when I go to place them NOT HAVE THEM SHOW UP. Something is wrong here. I just can't seem to figure out what.

    Lee
  15. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,544
    Country:
    netherlands
    Hi Lee,

    The XML file used to create the library is only a sort of intermediate file. It is not used by Rwy12, so you don't have to save that in your Rwy12 folder. I prefer to keep it with the MDL files of the objects.

    When using the Rwy12 export dialog, the first text box lists the path where the Rwy12 XML file will be created. Are you sure you have entered the correct path there?
  16. flyinmaninmn33

    flyinmaninmn33

    Joined:
    14/4/06
    Messages:
    13
    Hi Arno-

    I was just about to write here. It seems that everything is working ok now. I placed that one car that somebody made for me and I was able to see it. I placed the xml and BGL file that the rwy12 placer program generates in my Static Objects Library, Scenery folder and it seems to work. I see the xml file that the XML library creator generates it puts it as add_xxxxx.xml in the Rwy12 folder along with the other ones that are there by other people.

    It looks a bit different but it works ok. Thank you for your help here. I really appreciate help when things aren't going good or Im having troubles.

    Take Care Arno! :)

    Lee

Share This Page