Ejemplo n.º 1
0
        /// <summary>
        /// Creates a <see cref="DockableWindow"/> containing all of the components of the SynthesisGUI object
        /// </summary>
        /// <param name="app"></param>
        public static void CreateDockableWindows(Inventor.Application app)
        {
            IntPtr[] children = CreateChildDialog();

            UserInterfaceManager uiMan = app.UserInterfaceManager;

            EmbededJointPane = uiMan.DockableWindows.Add(Guid.NewGuid().ToString(), "BxD:RobotExporter:JointEditor", "Robot Joint Editor");
            EmbededBxDViewer = uiMan.DockableWindows.Add(Guid.NewGuid().ToString(), "BxD:RobotExporter:BxDViewer", "Robot BxD Viewer");


            #region EmbededJointPane
            EmbededJointPane.DockingState           = DockingStateEnum.kDockBottom;
            EmbededJointPane.Height                 = 250;
            EmbededJointPane.ShowVisibilityCheckBox = false;
            EmbededJointPane.ShowTitleBar           = true;
            EmbededJointPane.AddChild(children[0]);
            #endregion

            #region EmbededBxDViewer
            EmbededBxDViewer.DockingState           = DockingStateEnum.kDockRight;
            EmbededBxDViewer.Width                  = uiMan.DockableWindows["model"].Width;
            EmbededBxDViewer.ShowVisibilityCheckBox = false;
            EmbededBxDViewer.ShowTitleBar           = true;
            EmbededBxDViewer.AddChild(children[1]);
            #endregion

            EmbededBxDViewer.Visible = true;
            EmbededJointPane.Visible = true;
        }
        void CtrlDef_OnExecute(NameValueMap Context)
        {
            wpfWindow = new PluginWindow(m_inventorApplication, "{880b4435-f9c2-4c5e-b234-d543a20b5c36}");

            // Could be a good idea to set the owner for this window
            // especially if it was modeless as mentioned in this article:
            var helper = new WindowInteropHelper(wpfWindow);

            helper.EnsureHandle();
            //helper.Owner = new IntPtr(m_inventorApplication.MainFrameHWND);
            //wpfWindow.Show();

            var uimanager = m_inventorApplication.UserInterfaceManager;

            //Create window if missing
            if (myDockableWindow == null)
            {
                myDockableWindow = uimanager.DockableWindows.Add("{880b4435-f9c2-4c5e-b234-d543a20b5c36}", "URDF", "URDF converter");
            }

            if (!myDockableWindow.IsCustomized)
            {
                myDockableWindow.DockingState = DockingStateEnum.kFloat;
                myDockableWindow.Move(0, 0, myDockableWindow.Height, myDockableWindow.Width);
            }

            myDockableWindow.AddChild(helper.Handle);

            wpfWindow.Show();
            myDockableWindow.Visible = true;
            //wpfWindow.Show();
        }
Ejemplo n.º 3
0
        public void SetDockableWindow(string addinCLS)
        {
            UserInterfaceManager oUserInterfaceMgr = invApp.UserInterfaceManager;

            addInCLSIDStr = "{" + addinCLS + "}";

            try
            {
                oWindow = oUserInterfaceMgr.DockableWindows.Add(addInCLSIDStr, "CostEstimatorWindow", "Cost Estimator");
                oWindow.AddChild(CreateChildDialog());
                oWindow.DisabledDockingStates = DockingStateEnum.kDockTop & DockingStateEnum.kDockBottom;
                oWindow.DockingState          = DockingStateEnum.kDockRight;
                oWindow.Visible = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 4
0
        public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)
        {
            // This method is called by Inventor when it loads the addin.
            // The AddInSiteObject provides access to the Inventor Application object.
            // The FirstTime flag indicates if the addin is loaded for the first time.

            // Initialize AddIn members.
            inventor = addInSiteObject.Application;

            // TODO: Add ApplicationAddInServer.Activate implementation.
            // e.g. event initialization, command creation etc.
            selectionInfoWnd = inventor.UserInterfaceManager.DockableWindows.Add(ClientId,
                                                                                 "SelectionInfo.StandardAddInServer.selectionInfoWnd", "Selection");

            selectionPropertyGrid = new PropertyGrid();
            selectionInfoWnd.AddChild(selectionPropertyGrid.Handle);

            selectionInfoWnd.ShowVisibilityCheckBox = true;

            inventor.CommandManager.UserInputEvents.OnSelect += UserInputEvents_OnSelect;
        }
Ejemplo n.º 5
0
 private void UpdateMyVaultBrowser(Document doc)
 {
     doc.BrowserPanes["Vault"].Visible = false;
     _myVaultBrowser.AddChild(_hwndDic[doc]);
 }