Rohith Patchigolla
Ansys Employee

Hi Elena, 

I understand. I would suggest opening a new post in ANSYS Developer forum as this is the place for scripting related questions.

Also, please check the existing discussions, perhaps, a similar query might already have been answered. 

For checking DataModelObjectCategory, you can activate a particular object in the Mechanical Tree and type the below commands. 

activeObj = Tree.FirstActiveObject


Best regards,