You can select all entities containing extended data for a particular application using the filter-list argument of ssget.
The filter-list argument must be a list that contains -3 as its first element. The following example code selects all the objects in a drawing that include extended data for the "APPNAME" application:
(ssget "X" '((-3 ("APPNAME"))))
You can also expand the scope of the filter to filter specific types of objects. The following example code selects all the circles in a drawing that include extended data for the "APPNAME" application:
(ssget "X" '((0 . "CIRCLE") (-3 ("APPNAME"))))
If more than one application name is included in the -3 group's list, an AND operation is implied and the entity must contain extended data for all of the specified applications. So, the following statement would select all the objects with extended data for both the "APP1" and "APP2" applications:
(ssget "X" '((-3 ("APP1")("APP2"))))
Wild-card matching is also permitted, so either of the following statements will select all the objects with extended data for either or both of these applications.
(ssget "X" '((-3 ("APP[12]")))) (ssget "X" '((-3 ("APP1,APP2"))))