override protected void OnExecute(NameValueMap context)
        {
            var transaction = AddIn.CreateTransaction(DisplayName);

            try
            {
                // TODO Add extension method that finds a row based on part number.
                //var partsLists = DrawingDocument.ActiveSheet.PartsLists;

                foreach (var drawingView in AddIn.GetDrawingViews("Select a view"))
                {
                    drawingView.AddTopAndLeftProjectedViews(addDimensions: true, drawingDistance: 0.5);
                    AddPartNameNote(drawingView);
                }

                transaction.End();
            }
            catch (Exception ex)
            {
                transaction.Abort();
                MessageBox.Show(ex.ToString());
            }
        }
Example #2
0
        protected override void OnExecute(NameValueMap context)
        {
            var transaction = AddIn.CreateTransaction(DisplayName);

            try
            {
                foreach (var drawingView in AddIn.GetDrawingViews("Select a view"))
                {
                    drawingView.AddLeftThenTopProjectedViews(
                        numberOfTopViews: 3,
                        addDimensions: true,
                        drawingDistance: 2.5
                        );
                }

                transaction.End();
            }
            catch (Exception ex)
            {
                transaction.Abort();
                MessageBox.Show(ex.ToString());
            }
        }