detect link between geometry

hi,
I'm writing my first max script but I'm stuck at the point of detecting a link between 2 objects (geometry).
The script basically write to an xml file some info about the scene.
I take the selection and write each item to the file. so now I want to add link info.
how can I detect if an object is linked to an other, get the other object's name and detect what's there relation (parent-child) ?

hope I make myself clear ,

grtz

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
masquerade's picture

Hi, .parent property is what

Hi,

.parent property is what you are looking for.

for example

$box01.parent

-- returns the parent object of Box01 object. if there isnt any, it is undefined.

you can use a if clause to test if it is parented or not.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.