Rather dated by may be useful:
http://www.theswamp.org/index.php?topic=9461.msg129670#msg129670Also found this:
;;; vpsel.lsp
;;;
;;; By Jimmy Bergmark
;;; Copyright (C) 1997-2003 JTB World, All Rights Reserved
;;; Website:
www.jtbworld.com /
http://jtbworld.vze.com;;; E-mail: info@jtbworld.com / jtbworld@hotmail.com
;;;
;;; 2000-04-14 - First release
;;; Tested on AutoCAD 2000
;;;
;;;---------------------------------------------------------------------------;
;;; DESCRIPTION
;;;
;;; Select all visible objects in selected or active paperspace viewport
;;; Works transparently when in modelspace and for polygonal viewports too
;;; Example1: ERASE ALL R 'VPC >>> Erase all in model except what is visible
;;; Example2: (command "erase" "all" "r" (c:vpc) "")
;;; Example3: VPC ERASE >>> VPC is run previous the command and the objects
;;; are also in previous selection set
;;;
;;; c:vpc - select all visible objects with crossing in viewport
;;; c:vpw - select all visible objects with window in viewport