Can you explain the difference?
This returns all elements containing images on current page:
var myGraphics = app.activeWindow.activePage.allGraphics;
or you can check frame content type:
myFrame.contentType == ContentType.GRAPHIC_TYPE
The only difference between these is their contentType -- the left one has ContentType.GRAPHIC_TYPE, the right one ContentType.UNASSIGNED (or perhaps it was the other way around).
If you are checking for these two, you might also throw in an additional check for ContentType.TEXT_TYPE, which is otherwise a perfectly valid rectangle as well.
Correct, but not every graphic frame might contain a graphic.
Thanks for your speedy reply
I want to select the empty object frame (only frame) when the Graphics is not loaded
Thanks Tom and Jongware for your help and Sorry for the late reply.