Open a specific component in an assembly.

Hello,

I would need help to develop a code that would open a specific component in an assembly. The code would pass all the components that are open in an NX session. He will have to find the component that has the attribute (String) '' MASTER = YES ''. Once the part is found, NX will have to open it "Make Display Part".

If the code does not find a component with the attribute (String) '' MASTER = YES '', an error message should appear and do nothing. Also, an error message should also appear if it finds more than one component with this attributes and doing nothing.

I want to create a code similar to the '' Workpiece '' and '' Cavity Layout '' command from MoldWizard.

Thank you !