Append Objects from Library - Blender 2.6 Python Addon

I’m working on an addon for Blender that imports some basic scene files based on pre-made objects found in Library .blend file. Each object is represented by an ID + Name in the library file, where general types are separated by scenes (e.g. vehicles, buildings, etc.). The exporter from the game engine I wrote basically dumps the ID + Name and the position in a pretty simple format. However, if I have problems with the parsing the XML, I’ll create a new thread just to keep the topics separate. :wink:

I have been reading over the documentation (I’m pretty new to Blender’s API) and it seems I should be using something like:

with bpy.data.libraries.load(filepath) as (data_from, data_to):
    data_to.objects.append(data_from.scenes["Buildings"].objects["2348_LoD0_ModularDome])

However, this doesn’t seem to work. I am, however, able to import entire scenes per the example given in the documentation. Could anyone point me in the right direction here?

Also, if it isn’t too much to ask in one thread, any thoughts on manipulating/cloning the objects after appending them to the scene? Like, moving their positions to the coordinates found in the XML (I am using a simple struct to hold the string, coordinates, etc). I know when duplicating objects in Blender with the same name, a number is automatically appended to it, but I was wondering if I’d need to handle this myself. Basically, if I could get the appended object, I could probably work out the rest, but I couldn’t pick that up from the documentation.

Thanks for any help!