convert entities operation failed!

hello All

I have a piece that changes its size with the user form. At a certain size, the command convert entities is done, but when the size of the piece changes, the command submits an error. How can I fix this error?

Thank You

The piece that the edges have been chosen

Macro code

SolidworksApi/macros