how do I make VBA menu that run ilogic code, that can be place like Model , Ilogic Log and so ?

how do I make VBA menu that run ilogic code, that can be place like Model , Ilogic Log and so ?

Darkforce_the_ilogic_guy
Advisor Advisor
150 Views
0 Replies
Message 1 of 1

how do I make VBA menu that run ilogic code, that can be place like Model , Ilogic Log and so ?

Darkforce_the_ilogic_guy
Advisor
Advisor

how do I make a dockble VBA  menu that run ilogic code ?

 

Darkforce_the_ilogic_guy_0-1725603897873.png

 

This Ilogic code seems to do what i wan t... without the buttem that active the code.. I have try stuff online before that clame to do it .. but keep getting Error .. Easy might be if I some how can add my VBA form name KToolsv2 into the windows create by the Ilogic code added here. But is there a way to do this ..  and no I can´t just use Globel forms.. because some of my ilogic code does for some unknow reason not work the same way when it start form a Global form and a VBA Form

'https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/how-to-add-a-usercontrol-or-userform-to-a-dockablewindow-in/td-p/9119070

Dim oUserInterfaceMgr As UserInterfaceManager
        oUserInterfaceMgr = ThisApplication.UserInterfaceManager

        ' Create a new dockable window
        Dim oWindow As DockableWindow
        oWindow = oUserInterfaceMgr.DockableWindows.Add("SampleClientId6", "TestWindowInternalName6", "Test Window6")

        ' Get the hwnd of the dialog to be added as a child
        ' CHANGE THIS VALUE!
        Dim hwnd As Long
        hwnd = 4851096

        ' Add the dialog as a child to the dockable window
        oWindow.AddChild(hwnd)' Her I would Like To add a UserControl Or Userfrom!!!!!

        ' Don't allow docking to top and bottom
        oWindow.DisabledDockingStates = DockingStateEnum.kDockTop And DockingStateEnum.kDockBottom

        ' Make the window visible
        oWindow.Visible = True

 

 

I know that it is possible to make the vindue that can  

0 Likes
151 Views
0 Replies
Replies (0)