The .X format supports hierarchy, so basically if you have seperate objects in the Max File, name "Door", "Building" or whatever, you can then access them seperately from within DBP using the limb commands. This piece of code will search through your .X file and print all the object (limb) data:
Sync On
Sync Rate 0
Load Object "Test2.X", 1
Do
`Show hierarchy
set cursor 0,64
print "LIMB STRUCTURE"
perform checklist for object limbs 1
showlimbhierarchy()
Sync
Loop
function showlimbhierarchy()
For n = 2 To Checklist Quantity()
print (n - 1); " "; checklist string$(n) + " : " + str$(checklist value a(n)) + " : " + str$(checklist value b(n)) + " : " + str$(checklist value c(n)) + " : " + str$(checklist value d(n))
Next n
endfunction
Your main commands are: "perform checklist for object limbs 1" which will make an internal checklist of all the limbs in object 1. You can then access that data with: "checklist string$", which will return the name of the object, eg. "Door", "checklist value a", which is the limb number and checklist value b, c, and d but I have no idea what they return. lol.
Once you match up the name of the object with the limb number, you can then use the "rotate limb" command to rotate it like the door would.
It's pretty late here so that may sound a little incoherent but hopefully you can get the jist of what I said.

"Computers are useless they can only give you answers."