Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lisp to freeze layer in viewport

918 views
Skip to first unread message

Zach

unread,
Oct 4, 2002, 3:10:28 PM10/4/02
to
WOW, 2 lisp requests in one week.

I'm looking for something that will freeze layers in the viewports instead
of flipping through 40+ layouts. Maybe the command starts and it let you
type a layer or even better, brings up a dialog and lets you select multiple
layers. This possible?

--
add obvious to email


Tim

unread,
Oct 7, 2002, 7:57:10 AM10/7/02
to
Try this

;VPXF.lsp
;Freezes Xref Layer or Block Layer in a Viewport
;9/20/00 Tim Wilson
;
(defun c:VPXF(/ lay pik str )
(setq pik (nentsel "\nSelect an item on XREF or BLOCK Layer to Freeze in
the Viewport: "))
(setq lay (assoc 8 (entget (car pik))))
(setq str (cdr lay))
(command "vplayer" "F" str "c" "" )
(prompt (strcat "\nLayer " str " was Frozen."))
(princ)
);defun


"Zach" <kkacadman at yahoo> wrote in message
news:7F8531BD9DF5CD9A...@in.WebX.maYIadrTaRb...

Zach

unread,
Oct 7, 2002, 3:15:59 PM10/7/02
to
HI Tim.

What I'm wanting is something that I can type in a layer name or select the
layer or layers from a dialog and then it automatically goes through all the
layouts and freezes the layer or layers in all layouts.


Tim <twilson-tectonicengineering.com> wrote in message
news:AD17C04264B671BB...@in.WebX.maYIadrTaRb...

Alfred NESWADBA

unread,
Oct 7, 2002, 5:54:08 PM10/7/02
to
use acadcommand:

_vplayer

there you have the choice to freeze or thaw, active or all viewports, click
an object or type layername(s)

alfred


"Zach" <kkacadman at yahoo> schrieb im Newsbeitrag
news:067AD7CEEB7F8EE9...@in.WebX.maYIadrTaRb...

John Uhden

unread,
Oct 7, 2002, 9:33:05 PM10/7/02
to
Actually, I'm sorry to answer that I don't think you can attack multiple layouts
without causing a switch to each one. I think it was Bobby Jones who got me
interested in the subject. We were both trying to modify the XDATA of viewports
only to find that we could add layers to freeze, but not remove any (I think
that was the case). So to be sure, you would have to iterate through each
layout and use (command "VPLAYER" ...) to accomplish the task.

Perhaps Bobby can jump in and give us the latest scoop.

--
John Uhden, Cadlantic/formerly CADvantage
http://www.cadlantic.com
Sea Girt, NJ


"Zach" <kkacadman at yahoo> wrote in message
news:7F8531BD9DF5CD9A...@in.WebX.maYIadrTaRb...

Bobby C. Jones

unread,
Oct 8, 2002, 10:57:29 AM10/8/02
to
Hi John,
Freezing layers in viewports was the project that brought me back into
customizing AutoCAD after a short 2 or 3 year break. Here's the short
version of the road I traveled:

1. The only way to control layer status in viewports with vanilla LISP is
(command "_.VPLAYER" .....). This is due to the fact that we can not ENTMOD
a floating viewport.
2. It is possible to freeze layers in viewports via ActiveX. This includes
LISP, VBA, VB, and any language that is ActiveX enabled.
3. It is not possible to directly thaw layers in a viewport via ActiveX.
(I did manage to hack out a kludge to do this, but it is a kludge and I
wasn't happy with it)
4. If the VPLAYER command is not acceptable (and it is in most situations),
the only real solution to this problem is ARX.
5. Download vbXtender from http://vbxtender.sourceforge.net/ for an
opensource ARX solution to this and many other problems. (Note: I've never
used vbXtender from VLISP, although I don't know of any reason why it
couldn't be other than it's just easier from VB(A).

I know that I've seen several routines that wrap VPLAYER, but I couldn't
tell you where to find them. Maybe one of those authors will reply?? I
don't know if any of that is helpful to Zach or not and I know that none of
this info is new to you, but I had a few minutes to kill :-)
--
Bobby C. Jones
www.AcadX.com

"John Uhden" <juh...@cadlantic.com> wrote in message
news:84CB32A91A41A6E2...@in.WebX.maYIadrTaRb...

Luis Esquivel

unread,
Oct 8, 2002, 11:00:10 AM10/8/02
to
> I know that I've seen several routines that wrap VPLAYER, but I couldn't

Visit Jimmy B. site: www.jtbworld.com he has one.


michael puckett

unread,
Oct 8, 2002, 11:21:02 AM10/8/02
to
Hmmm ... May 24, 2001? That was a fun thread.

:)

"Bobby C. Jones" <bob...@acadx.com> wrote in message
news:5550C44A0D336C52...@in.WebX.maYIadrTaRb...


> Hi John,
> Freezing layers in viewports was the project that brought me back into
> customizing AutoCAD after a short 2 or 3 year break. Here's the short
> version of the road I traveled:

...


Bobby C. Jones

unread,
Oct 8, 2002, 11:30:05 AM10/8/02
to
I was thinking Jimmy B., but I didn't know for sure...Thanks Luis!

--
Bobby C. Jones
www.AcadX.com

"Luis Esquivel" <lsp...@hotmail.com> wrote in message
news:B2FC7A7A402A4F15...@in.WebX.maYIadrTaRb...

Bobby C. Jones

unread,
Oct 8, 2002, 11:49:03 AM10/8/02
to
The first of the first was actually 3/2/01...Can anyone guess what my
question was? Or who it was that gave me that first helping hand??

The thread from 5/24/01 was the last of the keys to making my kludge work.
And yes, that was a lot of fun! I still have the resulting GetViewData
function floating around somewhere...

The reading on the Fun-o-Meter for that thread is closely followed, or maybe
even superceded, by a thread on 5/21/01 for parsing lists.

Looking back over threads from that time frame reveals a lot of posts from
some great coders that really got the brain juices flowing :-)


--
Bobby C. Jones
www.AcadX.com


"michael puckett" <Sp@mSux> wrote in message
news:98E075F19890941B...@in.WebX.maYIadrTaRb...

michael puckett

unread,
Oct 8, 2002, 12:00:27 PM10/8/02
to
Hmmm ... "where is the vplayer status stored" or words to that effect?

:)

"Bobby C. Jones" <bob...@acadx.com> wrote in message

news:6B4DE7477E9E2B2F...@in.WebX.maYIadrTaRb...

Bobby C. Jones

unread,
Oct 8, 2002, 2:04:00 PM10/8/02
to
A memory like a bear trap!

BTW - My memory isn't so good, I had to do a little group archive searching
to pull up those old threads :-)


--
Bobby C. Jones
www.AcadX.com

"michael puckett" <Sp@mSux> wrote in message

news:26BD87EF1E499903...@in.WebX.maYIadrTaRb...

michael puckett

unread,
Oct 8, 2002, 2:09:53 PM10/8/02
to
Yes, and sadly it has already snapped.

I cheated: I remembered the thread but I thought it was two years ago, so I too
had to search the archives.

"Bobby C. Jones" <bob...@acadx.com> wrote in message

news:90102C7A2A495FA4...@in.WebX.maYIadrTaRb...

0 new messages