I think this is exactly what you need.
In short:
To hide a part in the PLI (your first question):
And this will change the part with another part in the PLI (your second question):
I don't know if there's an LDraw shortcut for a curled up string, otherwise youll have to make it yourself.
In short:
To hide a part in the PLI (your first question):
Code:
0 !LPUB PLI BEGIN IGN
0 // This won't show the part in PLI, but if it is a submodel, it will generate building instructions.
0 !LPUB PLI END
And this will change the part with another part in the PLI (your second question):
Code:
0 !LPUB PLI BEGIN SUB new_part.ldr 0
0 !LPUB PART BEGIN IGN
0 //Part you want to replace.
0 !LPUB PLI END
0 !LPUB PART END
I don't know if there's an LDraw shortcut for a curled up string, otherwise youll have to make it yourself.