Hello after struggling for a couple days I have come to the experts. I have a routine that selects a paperspace viewport and freezes and thaws layers as needed. I can select a viewport and it works fine if the viewport was created using mvsetup for example. where it fails is if the viewport was created using the object option. The routine selects the polyline and not the viewport the will not set the cvport variable. How do i filter out the polyline so it will only select the viewport object? Snippit of code below.
Code:
(defun c:ad (/ ss Vpid ss1)
(setvar "cmdecho" 0)
(setq scmde (getvar "cmdecho"))
(setq ss (car (entsel "\nselect viewport: ")))
(setq Vpid (cdr (assoc 69 (entget ss))))
(setq ss1 (entget ss))
(command "_.mspace")
(setvar "cvport" Vpid)
(command"vplayer" "f" "xref-*" "" "t" "xref-demo" "" "")
(command"-layer" "t" "demo|*" "f" "demo|A-FLOR-RMNA,demo|A-FLOR-RMNU,demo|A-FLOR-RMPB" "")
(command"vplayer" "f" "demo|*" "" "")