Jump to content

VP Freeze a Xref layer in a specific layout...


Recommended Posts

Posted
I check your lisp routine, oh boy ! It's not for beginner !

 

Is there an easy way to do that ? If I know the layout and layers name and if Im sure that these names will never change...

Did you get it to run?

 

Defining the layers is easy. When you say you know the layout, will the layout always have the same name?

  • Replies 25
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    13

  • DubweiserTM

    12

  • marlo5

    1

Posted

I try it ! It's what I want but more "automatic" !

 

The layout and the layers will always have the same, instead if someone change it by error...

Posted
I try it ! It's what I want but more "automatic" !

 

The layout and the layers will always have the same, instead if someone change it by error...

Hmm, maybe something like this...

 

Just edit the layers and layouts variable accordingly.

(defun c:Test (/ layers layouts ctab ss)
 (setq l[color=Red]ayers  "layer1,layer2,lay*"
       layouts '("Layout1" "Layout2")[/color]
       ctab    (getvar 'ctab)
 )
 (foreach x (layoutlist)
   (if (and (member x layouts)
            (setq ss (ssget "_X" (list '(0 . "VIEWPORT") (cons 410 x))))
       )
     (progn
       (setvar 'ctab x)
       (command "_.vplayer" "_Freeze" layers "_select" ss "" "")
     )
   )
 )
 (and ctab (setvar 'ctab ctab))
 (princ)
)

Posted

Yeah ! You're right !

 

This lisp is easier to understand for a beginner and it works !

 

Thank you very much !

 

:star: :thumbsup: :star: :thumbsup: :star: :thumbsup:

Posted
Yeah ! You're right !

 

This lisp is easier to understand for a beginner and it works !

 

Thank you very much !

 

:star: :thumbsup: :star: :thumbsup: :star: :thumbsup:

 

:)

If you have any questions about it, just ask. Also, if you wish to continue with LISP, PM me your email addy and I'll shoot you some reading. :)

  • 3 years later...
Posted

Try this as a MACRO.

 

^C^C_VPLAYER;F;*CRITDIM*,*MERCH*,*DIVISION*,*DIVISION_TEXT*,2EAS;A;;

 

Where the Xref layers are:

MERCH

DIVISION

DIVISION_TEXT

 

And other layers in the drawing i want frozen are:

CRITDIM

2EAS

 

Add the macro to your own new toolbar and this will freeze ALL layers

within 1 or all viewports within your drawing with just 1 Click.

 

cheers

 

marlo5

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...