In reply to NewToSV:
Without knowing the intent behind your request, I can’t suggest a more efficient way. Sometimes you get stuck on one approach and it becomes difficult to think of another strategy.
The only thing I can recommend is working with the owners of the code to make easier for you.