I have spend much time on interfacing all my switches and buttons in my cockpit to work with PMDG.
This can be done by EventIDs and FSUIPC but it's a big work.
Roar has developed a small utility which easily connects all your buttons and switches to the PMDG planes. Just press button you want to assign and select the PMDG function in the right side then it works.
Together with the other utilities from Roar it's very easy to connect Opencockpit modules and homemade buttons/swithces into PMDG plane.