public override void StartCommand()
        {
            base.StartCommand();

            base.SubscribeToEvent(Interaction.InteractionTypeEnum.kSelection);

            //initialize interaction previewgraphics objects

            //create and display the dialog
            m_boltHoleForm = new BoltHoleForm(m_inventorApplication, this);

            if (m_boltHoleForm != null)
            {
                m_boltHoleForm.Activate();
                m_boltHoleForm.TopMost       = true;
                m_boltHoleForm.ShowInTaskbar = false;
                m_boltHoleForm.Show();
                m_boltHoleForm.comBLibrary.Text = "BoltHoles";
                AddInformation();
            }

            //initialize this command data members
            m_withThisFace = null;

            //enable interaction
            EnableInteraction();
        }
        public BoltHolesFormCmd()
        {
            m_boltHoleForm = null;
            m_withThisFace = null;
            m_highlightSet = null;
            assembly       = System.Reflection.Assembly.GetExecutingAssembly();
            FileInfo asmFile = new FileInfo(assembly.Location);

            deFaultpath = asmFile.DirectoryName + "\\CavityLibrary";
        }
Exemple #3
0
        public BoltHolesRequest(Inventor.Application application, Face selectface, BoltHoleForm boltHoleForm)
        {
            m_inventorApplication = application;
            m_selsectFace         = selectface;
            m_boltHoleForm        = boltHoleForm;
            offset    = GetValueFromExpression(m_boltHoleForm.tboffset.Text);
            codename  = m_boltHoleForm.comBNumber.Text;
            indexname = m_boltHoleForm.comBLibrary.Text;
            IDName    = m_boltHoleForm.tbID.Text;
            assembly  = System.Reflection.Assembly.GetExecutingAssembly();
            FileInfo asmFile = new FileInfo(assembly.Location);

            filepath = asmFile.DirectoryName + "\\CavityLibrary";
        }
        public override void StopCommand()
        {
            //Terminate this preview graphic

            //destroy the command dialog
            m_inventorApplication.ActiveView.Update();
            m_boltHoleForm.Hide();
            m_boltHoleForm.Dispose();
            m_boltHoleForm = null;

            base.StopCommand();
            m_buttonDefinition.Pressed = false;

            ////set the command status to not-running
            //m_commandIsRunning = false;
        }