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.
- posted
20 years ago
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.
If you're talking about a FLOATING viewport, you can try vprfz.lsp on my site.
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,") ;many thanks to michael & tom works a treat.
dave
The autocad express tool layfrz will do that. Just make your button start the layfrz command. that's it.
Tell your friends!
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.