freeze in active viewport

Can someone please tell me the code to put behind a button so i can pick an object and make anything on its layer to freeze in the active viewport.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
If you're talking about a FLOATING viewport, you can try vprfz.lsp on my site.
--


MichaelB
www.michaelbulatovich.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
dc wrote:

I wrote this one. It works fine, but has a few issues, particularly with blocks, etc. Use with caution.
;;;--------------------------------------------------------->>FLCV ;;this function works like EP's LFREEZE function, but ;;it is for freezing in the current viewport! (defun C:FLCV ( / sset llst lay$ nxt ) (if (= (getvar "TILEMODE") 1) (progn (alert " WARNING!\n TILEMODE is set to 1\nResults may be unexpected!") (princ "\nSelect objects only if you wish to continue!") );progn );if (princ "\nSelect objects on layers to Freeze: ") (setq sset (ssget) llst (cdr (layset sset)) lay$ (car llst) llst (cdr llst) ;temp line test llst );setq (foreach lnam llst (setq nxt (car llst) lay$ (strcat lay$ "," nxt) llst (cdr llst) );setq );foreach (command "._VPLAYER" "F" lay$ "" "") (princ "\nThe following layers have been frozen in the CURRENT VIEWPORT:") (princ (strcat "\n" lay$)) (princ) );defun (princ "FLCV,") ;
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
many thanks to michael & tom works a treat.
dave

an
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tell your friends!

pick
viewport.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
The autocad express tool layfrz will do that. Just make your button start the layfrz command. that's it.

an
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.