Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can somebody confirm that Tap does not work i dockable windows? inventor freezes

1 REPLY 1
SOLVED
Reply
Message 1 of 2
kbo
Advocate
369 Views, 1 Reply

Can somebody confirm that Tap does not work i dockable windows? inventor freezes

Here is my code for a dockable window. I attached a small example of a dockable window addin that reads and writes iproperties in parts / assemblies / sub parts and assemblies and drawings on the fly.

My only problem is that i cant get the TAB button to work.

tab works when the child dialog is created with "Showdialog" but then inventor freezes.

what am i doing wrong?

please help me - somebody.

regards kent boettger.

Public Sub CreateDockableWindow(app As Inventor.Application, addInCLS As String) Dim uiMgr As UserInterfaceManager = app.UserInterfaceManager Dim myDockableWindow As DockableWindow = uiMgr.DockableWindows.Add(addInCLS, "MyWindow", "My Add-in Dock") myDockableWindow.AddChild(CreateChildDialog()) If Not myDockableWindow.IsCustomized Then myDockableWindow.DockingState = DockingStateEnum.kFloat myDockableWindow.Move(25, 25, myDockableWindow.Height, myDockableWindow.Width) End If End Sub Public Function CreateChildDialog() As Long If Not dc Is Nothing Then dc.Dispose() dc = Nothing End If dc = New Form1() 'Addin works but no Tab? dc.Show(New WindowWrapper(m_invApp.MainFrameHWND)) 'Tab works here but inventor freezes 'dc.ShowDialog(New WindowWrapper(m_invApp.MainFrameHWND)) Return dc.Handle.ToInt64() End Function

 

1 REPLY 1
Message 2 of 2
kbo
Advocate
in reply to: kbo

in case someone is struggling with the same problem.

 

Here is how i solved this.

 

    Private Sub TapPressed()

        If Me.txtPartNumber.Focused = True Then

            Me.txtDescription1.Focus()

        ElseIf Me.txtDescription1.Focused = True Then

            Me.txtDescription2.Focus()

        ElseIf Me.txtDescription2.Focused = True Then

            Me.txtDesignationGB.Focus()

        ElseIf Me.txtDesignationGB.Focused = True Then

            Me.txtDesignationDE.Focus()

        ElseIf Me.txtDesignationDE.Focused = True Then

            Me.txtAxRohdim.Focus()

        ElseIf Me.txtAxRohdim.Focused = True Then

            Me.txtType.Focus()

        ElseIf Me.txtType.Focused Then

            txtOverallDim.Focus()

        ElseIf Me.txtOverallDim.Focused = True Then

            Me.txtRoh.Focus()

        ElseIf Me.txtRoh.Focused = True Then

            Me.txtOrderNo.Focus()

        ElseIf Me.txtOrderNo.Focused = True Then

            Me.txtCustomer.Focus()

        End If

    End Sub

    Private Sub iPropsfrm_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown

        If e.KeyCode = Keys.Escape Then

            'MsgBox("Pressed ESC")

            'get rid of the annoying ding sound
            e.SuppressKeyPress = True

        End If

        If e.KeyCode = Keys.Tab Then

            'get rid of the annoying ding sound
            e.SuppressKeyPress = True

            TapPressed()

            'MsgBox("Pressed TAB")

            
        End If

    End Sub

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report