Esempio n. 1
0
 /// <summary>
 /// Constructor 2
 /// </summary>
 /// <param name="pConfig">Plotting configuration</param>
 /// <param name="minPoint">Bottom - left point</param>
 /// <param name="maxPoint">Up - right point</param>
 public Sheet(EPoint2D minPoint, EPoint2D maxPoint,
              string sheetPath, string layoutName
              )
     : this()
 {
     MinPoint = minPoint;
     MaxPoint = maxPoint;
     Path     = sheetPath;
     Name     = layoutName;
 }
Esempio n. 2
0
        /// <summary>
        /// Gets window plotted from active document and sets to this
        /// </summary>
        public void Set(AcadApplication acApp)
        {
            // Set focus to acad application
            AcadApp.SetFocus(acApp.HWND);

            try
            {
                // Set window to plot
                AcadUtility acUtil = acApp.ActiveDocument.Utility;
                double[]    p1, p2;
                p1       = acUtil.GetPoint(System.Type.Missing, "\nSpecify plot window: ") as double[];
                p2       = acUtil.GetCorner(p1, System.Type.Missing) as double[];
                MinPoint = new EPoint2D(p1[0], p1[1]);
                MaxPoint = new EPoint2D(p2[0], p2[1]);

                // Set Path (path of .dwg file)
                this.Path = acApp.ActiveDocument.FullName;

                // Set Name (= name of layout)
                this.Name = acApp.ActiveDocument.ActiveLayout.Name;
            }
            catch { }
        }