Example #1
0
        public override void StartCommand()
        {
            base.StartCommand();

            base.SubscribeToEvent(Interaction.InteractionTypeEnum.kSelection);

            //initialize interaction previewgraphics objects

            //create and display the dialog
            m_insertXportForm = new InsertXportForm(m_inventorApplication, this);

            if (m_insertXportForm != null)
            {
                m_insertXportForm.Activate();
                m_insertXportForm.TopMost       = true;
                m_insertXportForm.ShowInTaskbar = false;
                m_insertXportForm.Show();
                AddInformation();
            }

            //initialize this command data members
            m_firstFace  = null;
            m_secondFace = null;

            m_UCS = null;

            //enable interaction
            EnableInteraction();
        }
Example #2
0
        public override void StopCommand()
        {
            //Terminate this preview graphic
            m_inventorApplication.ActiveView.Update();
            //destroy the command dialog
            //m_insertXportForm.Hide();
            m_insertXportForm.Dispose();
            m_insertXportForm = null;

            if (m_highlightSet != null)
            {
                this.ClearHighlight();
            }

            if (m_UCS != null)
            {
                if (m_UCS.Visible == true)
                {
                    m_UCS.Visible = false;
                }
            }

            xdistance      = 0;
            ydistance      = 0;
            m_insertplane  = 0;
            m_firstFace    = null;
            m_highlightSet = null;
            m_secondFace   = null;
            m_xportID      = null;
            base.StopCommand();
        }
Example #3
0
        public InsertXportCmd()
        {
            m_insertXportForm = null;
            m_firstFace       = null;
            m_secondFace      = null;
            m_highlightSet    = null;
            m_UCS             = null;
            m_xportID         = null;
            assembly          = System.Reflection.Assembly.GetExecutingAssembly();
            FileInfo asmFile = new FileInfo(assembly.Location);

            deFaultpath = asmFile.DirectoryName;
            filepath    = deFaultpath + "\\CavityLibrary";
        }