Macro fails to generate reference plane at specified location

The solution was to avoid using the SelectByID2 method. Thank you ‌!

SolidworksApi/macros