how can i draw p&id drawing in 3d
You're question doesn't make sense, since your asking about two different things:
A P&ID is just a schematic diagram that shows the interconnections between various instruments. The instruments/components are represented as iconic symbols; pipes are drawn as single lines, not to true length or true shape/position. Sometimes P&IDs are drawn in isometric, giving a 3D representation.
A 3D is typically a graphic model that represents the actual size/shape/location of all the instruments and components in the piping system.
So, please describe what exactly what you want to do