Esempio n. 1
0
        private string GetSheetFormat(ModelDoc2 m)
        {
            DrawingDoc d = (DrawingDoc)m;

            string[] sht_names = (string[])d.GetSheetNames();
            Sheet    s         = d.get_Sheet(sht_names[0]);

            return(s.GetTemplateName());
        }
Esempio n. 2
0
            //public string SheetName { get; set; }

            /// <summary>
            /// Размеры листа
            /// </summary>
            /// <param name="sheetName">Name of the sheet.</param>
            /// <returns></returns>
            public List <SizesClass> SheetSizes(string sheetName)
            {
                var list    = new List <SizesClass>();
                var размеры = new SizesClass();

                Init();
                foreach (View view in _swDraw.get_Sheet(sheetName).GetViews())
                {
                    // MessageBox.Show(view.Name + " - " + view.GetDimensionCount());

                    string[] dimensionIds4 = view.GetDimensionIds4();

                    //swDocExt.SelectByID2("D1@Расстояние[email protected]", "DIMENSION", 0, 0, 0, true, 0, null, 0);
                    //var myDimension = ((Dimension)(swDoc.Parameter("D1@Расстояние1")));
                    //myDimension.SystemValue = 0; // p1Deep = 19.2;


                    foreach (string dimensoinId in dimensionIds4)
                    {
                        // MessageBox.Show(d);
                        размеры.DimId    = dimensoinId;
                        размеры.ViewName = view.Name;
                        list.Add(размеры);
                    }

                    //var dimensionsForView = (string[])view.GetDimensionDisplayString4();
                    //foreach (var d in dimensionsForView)
                    //{
                    //    MessageBox.Show(d);
                    //}

                    //var dimensionsForView = (double[])view.GetDimensionDisplayInfo5();
                    //foreach (var d in dimensionsForView)
                    //{
                    //    MessageBox.Show(d.ToString());
                    //}
                }
                return(list);
            }