2 Replies Latest reply on May 22, 2014 9:07 AM by kendall_hiles

    Setting Up "Mode" Defaults

    agreen1

      Hi!

       

      We're just really getting started with Expedition automation; forgive me if this has been covered before. I'd like to do some "convenience" changes to the default settings for the "Draw Mode" in Expedition; specifically, for example, I'd like the Angle Lock to be enabled by default. Currently this mode disables itself whenever I switch out of Shape mode and then go back again. I know how to set defaults at startup but can this be done while swiching modes too?

       

      Thanks!

      Andy

        • 1. Re: Setting Up "Mode" Defaults
          andrew.french

          you'd need an event trigger for switching to draw mode which I don't believe exists but try searching the documentation, I could be wrong.

          • 2. Re: Setting Up "Mode" Defaults
            kendall_hiles

            This is what I am working on now that looks at the mode changes and makes modifications to the displayed icons.  It will be in the next release of AATK to work with the VX release.

             

            Scripting.DontExit = True ' Keep on running

            Dim cbs, tb

             

            Sub pcbDoc_OnNotify(eType)
                Set cbs = pcbapp.Gui.CommandBars
                If eType = epcbOnNotifyModeChanged Then
            Select Case pcbApp.Gui.ActiveMode

            Case epcbModeRoute 
                    For Each tb In cbs
                        If tb.Name = "Draw Create" Then tb.Visible = False
                        If tb.Name = "Draw Edit" Then tb.Visible = False
                        If tb.Name = "Place" Then tb.Visible = False
                        If tb.Name = "Route" Then tb.Visible = True
                    Next

            Case epcbModePlace
                    For Each tb In cbs
                        If tb.Name = "Draw Create" Then tb.Visible = False
                        If tb.Name = "Draw Edit" Then tb.Visible = False
                        If tb.Name = "Place" Then tb.Visible = True
                        If tb.Name = "Route" Then tb.Visible = False
                    Next
             
            Case epcbModeDrawing 
                    For Each tb In cbs
                        If tb.Name = "Draw Create" Then tb.Visible = True
                        If tb.Name = "Draw Edit" Then tb.Visible = True
                        If tb.Name = "Place" Then tb.Visible = False
                        If tb.Name = "Route" Then tb.Visible = False
                    Next
             
            Case epcbModeRF 
              'MsgBox "OnNotify RF"
            Case epcbModeModeless 
              'MsgBox "OnNotify Modeless"

            End Select
                   
                End If
              
            End Sub