Jump to content

Is there an easier way to unlock a veiwport


Recommended Posts

Posted

sometimes the veiwport is locked in a drawing, but the layer is turned off

 

is there any easier way then turning the veiwport layer on and clicking on the vp and unlocking the vp in properties

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • Nick-H-

    8

  • alanjt

    7

  • Tiger

    3

  • Glen Smith

    3

Top Posters In This Topic

Posted Images

Posted

Nah im on Acad 2007 full version now, i need to change my profile

Posted

I am using 2008, here, when I activate the viewport I get a new view on the status bar where it first is a padlock, then the viewport scale and then the annotative scale. While the viewport is active, you can simple click the padlock to unlock it.

 

That being said, and this is solely my own personal opinion, I hate having viewports on freezed layers, it creates all kinds of confusions and just looks wrong! Much better in my view to have them on one separate layer and have that non-plottable.

Posted

I always have my vports switched on and non plottable as mentioned in previous. I also have my right click custimization turned on so that when i want to unlock or lock I just select vport and right click then select lock or unlock. Its slightly easier than going into properties.

Posted
I always have my vports switched on and non plottable as mentioned in previous. I also have my right click custimization turned on so that when i want to unlock or lock I just select vport and right click then select lock or unlock. Its slightly easier than going into properties.

 

I have not made any customization on my right-click and I also have the Display Locked option in there when I right-click on the highligthed viewport - so try that!

Posted

My drawing template has the viewport very close to the titleblock perimeter, so I have a hard time selecting the Vport. I wrote macros to lock and unlock them. The macro posted above (Thanks ReMark) in the AutoCAD forum for locking makes it even easier to lock all the Vports (lock them all rather than selecting them). I find it a pain to look for the "Display Locked" (I never remeber how far down it is) then mouse right to select on or off.

 

 

Oh heck, I wasn't going to post them, after ReMark posted the link, but here they are anyway.

 

Lock

^C^C-VPORTS;_LOCK;ON;ALL;;

 

Unlock

^C^C-VPORTS;_LOCK;OFF

 

Glen

Posted

Holy parenthesis Batman! I have no doubt that this is more robust than the macros I posted. It just boggles my mind that all that code is necessary to do what a macro can do in 3 or 4 commands.

 

Of course on the flip side, I've seen some of your routines that are just a few lines long that do an incredible amount of work.

 

Glen

Posted
Holy parenthesis Batman! I have no doubt that this is more robust than the macros I posted. It just boggles my mind that all that code is necessary to do what a macro can do in 3 or 4 commands.

 

Of course on the flip side, I've seen some of your routines that are just a few lines long that do an incredible amount of work.

 

Glen

 

True :)

In this case, I should have just taken the command route. It's not that mine takes more code, it's that I had to write my own lock, unlock function.

 

(defun c:LV (/ #Choice)
 (initget 0 "Yes No")
 (and (or (setq #Choice (getkword "Lock Viewports [Yes/No] <Yes>: "))
          (setq #Choice "Yes")
      ) ;_ or
      (or (zerop (getvar "tilemode")) (setvar "tilemode" 0))
      (not (command "_.-vports"
                    "_lock"
                    (if (eq #Choice "Yes")
                      "_on"
                      "_off"
                    ) ;_ if
                    "_all"
                    ""
           ) ;_ command
      ) ;_ not
      (princ (strcat "\nAll viewports have been "
                     (if (eq #Choice "Yes")
                       "Locked!"
                       "Unlocked!"
                     ) ;_ if
             ) ;_ strcat
      ) ;_ princ
 ) ;_ and
 (princ)
) ;_ defun

Posted

Still a few, but I made it a single routine with a choice and I put a prompt at the end.

Posted
what are all them codes for?

 

For dancing baby!

 

Title.PNG

Posted

cool. im guessing there some lisp program but how are they used, and the macro how do you use them

Posted
cool. im guessing there some lisp program but how are they used, and the macro how do you use them

 

You can't utilize the lisp since you are LT. The macros can be placed in a button.

Posted
what are all them codes for?

 

I think you got more than you asked for :thumbsup:

Posted

im going to change my profile, because im not in LT no more :)

Posted
You can't utilize the lisp since you are LT. The macros can be placed in a button.

 

How do i do the Macros? for a freind using LT

 

and how do i do the LISP? i have never used it before

Posted
How do i do the Macros? for a freind using LT

 

and how do i do the LISP? i have never used it before

 

Macros: Stick them in a button.

Lisp: Paste content into notepad and save as a .lsp file, then appload into Autocad.

Posted

sorry for the pain staking task of explaing to me, but ive never done either before, what do you mean by stick in a button, how do i go about it, i would be very grateful

 

Nick

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...