SUModelGetActivePath is not available before 2020.2
You would have to make a Ruby C call to SketchUp’s Ruby API
Then somehow pass the Ruby array back to the C side. (But the Ruby ↔ C conversion functions also are 2020.2+)
See the PDF book on Extending Ruby in C, last listed book in the downloadable books list.