Object selection using 3d coordinates

When running Selectionobjects
I am wondering if there is a way to select an object by specifying a range with 2 point 3d coordinates on the screen.
I am APIbeginner.
Because of my lack of English skills, I wrote it through Google Translator.
Please understand even if the context is unnatural.