public VertMidPointRectangle(IInventorButton rectangleButton, Inventor.Application inventorApplication = null)
        {
            _inventorApplication = inventorApplication;
            _rectangleButton = rectangleButton;
            _changeProcessor = new General.QubeItToolsChangeProcessor(_inventorApplication, this,
                "VertMidPtRect", "Vertical Mid-Point Rectangle", StandardAddInServer.AddInServerId);
            TransientGeometry tG = _inventorApplication.TransientGeometry;
            _upperRightPoint2d = tG.CreatePoint2d();
            _upperLeftPoint2d = tG.CreatePoint2d();
            _lowerLeftPoint2d = tG.CreatePoint2d();
            _lowerRightPoint2d = tG.CreatePoint2d();

            _constructionLineButton = _inventorApplication.CommandManager.ControlDefinitions["SketchConstructionCmd"] as ButtonDefinition;
            _centerLineButton = _inventorApplication.CommandManager.ControlDefinitions["SketchCenterlineCmd"] as ButtonDefinition;
            _sketchOnlyButton = _inventorApplication.CommandManager.ControlDefinitions["SketchOnlyCmd"] as ButtonDefinition;
        }
Esempio n. 2
0
        public VertMidPointRectangle(IInventorButton rectangleButton, Inventor.Application inventorApplication = null)
        {
            _inventorApplication = inventorApplication;
            _rectangleButton     = rectangleButton;
            _changeProcessor     = new General.QubeItToolsChangeProcessor(_inventorApplication, this,
                                                                          "VertMidPtRect", "Vertical Mid-Point Rectangle", StandardAddInServer.AddInServerId);
            TransientGeometry tG = _inventorApplication.TransientGeometry;

            _upperRightPoint2d = tG.CreatePoint2d();
            _upperLeftPoint2d  = tG.CreatePoint2d();
            _lowerLeftPoint2d  = tG.CreatePoint2d();
            _lowerRightPoint2d = tG.CreatePoint2d();

            _constructionLineButton = _inventorApplication.CommandManager.ControlDefinitions["SketchConstructionCmd"] as ButtonDefinition;
            _centerLineButton       = _inventorApplication.CommandManager.ControlDefinitions["SketchCenterlineCmd"] as ButtonDefinition;
            _sketchOnlyButton       = _inventorApplication.CommandManager.ControlDefinitions["SketchOnlyCmd"] as ButtonDefinition;
        }