Author Topic: Your opinion on locking viewports  (Read 2932 times)

0 Members and 1 Guest are viewing this topic.

A_LOTA_NOTA

  • Guest
Your opinion on locking viewports
« on: December 05, 2008, 09:33:24 AM »
In our company standards it is stated that all viewports must be locked before closing a drawing. So a co-worker of mine would like to a program that will unlock all the viewports when the drawing is opened & lock them again when it is closed.

So what is your opinion on the best way to do this?

Thanks for your thought

hendie

  • Guest
Re: Your opinion on locking viewports
« Reply #1 on: December 05, 2008, 09:35:38 AM »
IF all the viewports are unlocked when the drawing is opened - what is the point in  locking them in the first place ?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Your opinion on locking viewports
« Reply #2 on: December 05, 2008, 09:42:56 AM »
Good point Alan.
No one there to see if they are locked. 8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Your opinion on locking viewports
« Reply #3 on: December 05, 2008, 09:46:09 AM »
You may find something you can use from here:
http://www.theswamp.org/index.php?topic=7097.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

A_LOTA_NOTA

  • Guest
Re: Your opinion on locking viewports
« Reply #4 on: December 05, 2008, 09:47:05 AM »
IF all the viewports are unlocked when the drawing is opened - what is the point in  locking them in the first place ?

He doesn't like locked viewports, so he wants his to be unlocked when he opens a drawing. Then to comply with company standards he wants them to be locked when he closes the drawing. A typical lazy drafter, not wanting to press any extra buttons to lock/unlock the vports.  :-)

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Your opinion on locking viewports
« Reply #5 on: December 05, 2008, 09:48:01 AM »
And being the VB/A junkie that I am, I/we use this to lock all viewports within the current drawing.


Code: [Select]
Public Sub LockAllVPorts()
    Dim oLayout As AcadLayout
    Dim oEnt As AcadEntity
   
    With ThisDrawing
        For Each oLayout In .Layouts
            If Not oLayout Is .ModelSpace Then
                For Each oEnt In oLayout.Block
                    If TypeOf oEnt Is AcadPViewport Then
                        oEnt.DisplayLocked = True
                    End If
                Next oEnt
            End If
        Next oLayout
    End With
   
    ThisDrawing.Utility.Prompt vbCrLf & " Viewport locking complete!"
End Sub
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

A_LOTA_NOTA

  • Guest
Re: Your opinion on locking viewports
« Reply #6 on: December 05, 2008, 09:49:32 AM »
Good point Alan.
No one there to see if they are locked. 8-)

If the boss opens a drawing they better be locked. So then someone would be there to see if they were locked.

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Your opinion on locking viewports
« Reply #7 on: December 05, 2008, 09:51:58 AM »
IF all the viewports are unlocked when the drawing is opened - what is the point in  locking them in the first place ?

He doesn't like locked viewports, so he wants his to be unlocked when he opens a drawing. Then to comply with company standards he wants them to be locked when he closes the drawing. A typical lazy drafter, not wanting to press any extra buttons to lock/unlock the vports.  :-)

What's his reason for wanting unlocked viewports?  Is it so that he can work within the PS viewport?  If so, he can just double-click on the viewport outline and that will throw him INTO the viewport and he can pan and zoom and work, and when he's done, all he has to do is simply double-click the MAXIMIZE/MINIMIZE VIEWPORT icon.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

A_LOTA_NOTA

  • Guest
Re: Your opinion on locking viewports
« Reply #8 on: December 05, 2008, 09:57:15 AM »
IF all the viewports are unlocked when the drawing is opened - what is the point in  locking them in the first place ?

He doesn't like locked viewports, so he wants his to be unlocked when he opens a drawing. Then to comply with company standards he wants them to be locked when he closes the drawing. A typical lazy drafter, not wanting to press any extra buttons to lock/unlock the vports.  :-)

What's his reason for wanting unlocked viewports?  Is it so that he can work within the PS viewport?  If so, he can just double-click on the viewport outline and that will throw him INTO the viewport and he can pan and zoom and work, and when he's done, all he has to do is simply double-click the MAXIMIZE/MINIMIZE VIEWPORT icon.

Matt,

 I agree, that would be the way to do it (that is how I do it myself). Most drafters have the mind set that "my way is the only way" & it is better to not challenge that sometimes. So when he asked me to write it for him I said I would look in to it.


Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: Your opinion on locking viewports
« Reply #9 on: December 05, 2008, 10:02:54 AM »
IF all the viewports are unlocked when the drawing is opened - what is the point in  locking them in the first place ?

He doesn't like locked viewports, so he wants his to be unlocked when he opens a drawing. Then to comply with company standards he wants them to be locked when he closes the drawing. A typical lazy drafter, not wanting to press any extra buttons to lock/unlock the vports.  :-)

What's his reason for wanting unlocked viewports?  Is it so that he can work within the PS viewport?  If so, he can just double-click on the viewport outline and that will throw him INTO the viewport and he can pan and zoom and work, and when he's done, all he has to do is simply double-click the MAXIMIZE/MINIMIZE VIEWPORT icon.

Matt,

 I agree, that would be the way to do it (that is how I do it myself). Most drafters have the mind set that "my way is the only way" & it is better to not challenge that sometimes. So when he asked me to write it for him I said I would look in to it.
Just tell him straight up that AutoCAD already has a command and he should use that instead of you having to reinvent the wheel just for him.  And besides... what happens if he unlocks the viewport and, I dunno... FORGETS to lock it again or FORGETS to push the button??  Now you're looking at creating a reactor that fires only when a drawing is saved and disregards any autosaves.  I run into stuff like this all the time here.  I tell  "Yeah, I can look into that." and when I come back to them and say, "instead of doing this, AutoCAD already has THIS feature".  Most of the time their response is "Cool!  I didn't know that!".  So now they're happy, you're happy.  Life is good.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Bob Wahr

  • Guest
Re: Your opinion on locking viewports
« Reply #10 on: December 05, 2008, 10:08:53 AM »
The first time he screwed a viewport up in a drawing, I would kick his ass.

CADaver

  • Guest
Re: Your opinion on locking viewports
« Reply #11 on: December 05, 2008, 11:10:27 PM »
The first time he screwed a viewport up in a drawing, I would kick his ass.
And I'd hold him tightly about the neck while you did.  Then I'd look for the guy that gave him the function.

The boss has a reason for locking the viewports.  If you give this bozo a method to circumvent the boss' intent, the boss will hold YOU responsible.