Custom photodiode symbol in LTSpice 'syntax error in transmission line statement: ".."'
You aren't allowed to change the prefix letter of a component however you like. Each prefix letter is hard-coded to create a certain type of component, and you can't change that. For example, all diodes must start with "D", and all resistors must start with "R". 

By changing the prefix to "P" you told LTSpice that you're placing a transmission line in your circuit, rather than a diode. 

But actually, your model is a subcircuit, rather than a single diode. So you must use the "X" prefix rather than "D". 

For a more general tutorial on creating subcircuit models and inserting them into other designs, see this old question: How to make LTSpice sub-circuits available globally?.