How do I get a list of the current THAWED (only) layers within a (current)
viewport ... and then write these layer names to an external file?
Would someone be so kind as to offer a little help here?
You can find a list of the frozen layers in a viewport by examining the
multiple groups 1003 for the extended list obtained with
(enget(car(entsel))'("ACAD"))
for the viewport of interest.
Then you can step through the Layer Table with (tblnext ...) and keep track
of which layers in the Layer Table are *not* among those frozen in the
viewport.
There may be a (vl-xxx)/(vla-xxx)/(vlx-xxx) function to do this more
quickly, but I'm not familiar with one.
BTW, your demanding attitude won't win you many friends here. These NGs
offer peer-to-peer assistance and discussion; no one who hangs out here is
under any kind of obligation to help anyone, especially someone who starts
showing an "attitude."
___
"rsajr" <in...@cadesigner.com> wrote in message
news:AE93941B6A09E349...@in.WebX.maYIadrTaRb...
(setq offlist nil)
(command "pspace")
(setq a(entsel))
(setq ft a)
(setq b(entget(car a)))
(setq en(car a))
(setq yo(entget en '("acad")))
(setq yo1(assoc -3 yo))
(setq yo2(cdr(last yo1)))
(setq f(open "fl" "w"))
(setq yo3(cdr(assoc 1003 yo2)))
(setq b2(last yo))
(setq c(cdr(cdr(last b2))))
(setq len(length c))
(setq ct 0)
(repeat len
(progn
(if (= (car(nth ct c)) 1003)
(progn
(setq bb(cdr(nth ct c)))
(write-line bb f)
)
) (setq ct(1+ ct))
);progn
);repeat
(close f)
"Rudy" <Ru...@cadentity.com> wrote in message
news:3A6131816733D07F...@in.WebX.maYIadrTaRb...
> Are you reading through the sentence?
>
> It doesn't sound demanding at all.
>
> > > Would someone be so kind as to offer a little help here?
>
> Sounds more like a plea for help.
>
> WOULD SOME OFFER A HELP, NOW!
>
> That sounds more demanding.
>
> Are you OK today Paul?
>
> Please! sounds good too.
>
>
> "Paul Turvill" <nos...@turvill.com> wrote in message
> news:F8272A83CEBC2232...@in.WebX.maYIadrTaRb...
It doesn't sound demanding at all.
> > Would someone be so kind as to offer a little help here?
Sounds more like a plea for help.
WOULD SOME OFFER A HELP, NOW!
That sounds more demanding.
Are you OK today Paul?
Please! sounds good too.
"Paul Turvill" <nos...@turvill.com> wrote in message
news:F8272A83CEBC2232...@in.WebX.maYIadrTaRb...
Just to show that I'm at least *trying* to keep the meaning of the Season,
try the following:
;;VPLLIST.LSP - ViewPort Layer Listing Routine
;; Creates a file VLayer.txt containg the names of all layers
;; not frozen in the current floating paper space layout
;;
;;CAUTION - This is a "skeleton" routine, intended only to
;; demonstrate principles of data extraction. It contains no
;; error trapping or other "bulletproofing," and does not check
;; to confirm that a floating paper space viewport is current.
;; It should be used with these limitations firmly in mind.
;;(c) 2002 Tee Square Graphics
;;Function to get list of layers frozen in current viewport:
(defun fvplist (/ vp vpdat exdat llist)
(setq vp (ssget "x" (list '(0 . "viewport")(cons 69 (getvar "cvport"))))
vpdat (entget (ssname vp 0) '("ACAD"))
exdat (cdadr (assoc -3 vpdat))
);;setq
(foreach x (cdr exdat)
(if (= (car x) 1003)
(setq llist (append (list (cdr x)) llist))
);;if
);;foreach
llist
);;defun
;;Main program - writes list of visible layers to file:
(defun C:VPLLIST (/ frz lyr)
(setq frz (fvplist)
outf (open "VLayer.txt" "w")
);;setq
(while (setq lyr (tblnext "layer" (not lyr)))
(setq lname (cdr (assoc 2 lyr)))
(if (not (member lname frz))
(write-line lname outf)
);;if
);;while
(close outf)
(alert "List of visible layers written to VLayer.txt")
(princ)
);;defun
"rsajr" <in...@cadesigner.com> wrote in message
news:CB9373D1C0231860...@in.WebX.maYIadrTaRb...
(defun C:VPLLIST (/ frz outf lyr lname)
___
"Paul Turvill" <nos...@turvill.com> wrote in message
news:FEE3C79C6C913526...@in.WebX.maYIadrTaRb...
Will everyone PLEASE accept my apology?
"Paul Turvill" <nos...@turvill.com> wrote in message
news:F8272A83CEBC2232...@in.WebX.maYIadrTaRb...
Would someone be so kind as to offer a little help here?
...as it sounded a bit like an impatient customer in a KMart checkout line
(to which some of us have had too much exposure recently).
___
"Rudy" <Ru...@cadentity.com> wrote in message
news:3A6131816733D07F...@in.WebX.maYIadrTaRb...
Sorry to say that I don't recall seeing your original post of the 17th, or I
probably would have given it a quick reply.
Anyway, I hope you'll find the code I posted of some help.
___
"rsajr" <in...@cadesigner.com> wrote in message
news:8C005B8640DD43E0...@in.WebX.maYIadrTaRb...
"Paul Turvill" <nos...@turvill.com> wrote in message
news:FEE3C79C6C913526...@in.WebX.maYIadrTaRb...
Bill DeShawn
bdes...@prodigy.net
http://pages.prodigy.net/bdeshawn/bdeshawn.htm
"Paul Turvill" <nos...@turvill.com> wrote in message
news:1CA757BF033FDEB1...@in.WebX.maYIadrTaRb...