Change the part in .prt

Hello,
I'm new to this... is there any code example to change the part of a .prt file for another part?
Thanks

Can you clarify exactly what you are trying to do? Perhaps you want to replace a component in an assembly?

Recording a journal while performing the desired action is a great first step to get working code. The journal recorder usually includes some code that is unnecessary to your specific task; but the code can be cleaned up and modified to suit your needs.

Hello,
I would like to introduce a code for a solid body in a window, and use it as a variable to change the solid body of the .prt to that of the variable...I don't know if you understand me?

Jlm

If I understand correctly, you have a parameterized model (one that you created completely in NX) and you want code to change the value of one (or more) of the body parameters. For instance, let's say you create a "block" in NX and give the length, width, and thickness values; you want code that will change the length value and update the body. Is this correct?