コード例 #1
0
 //создает проект детали
 public void CreateDoc()
 {
     swApp = new SldWorks {
         Visible = true
     };
     swApp.NewPart();
     swDoc = swApp.GetFirstDocument();
     swDoc.SketchManager.InsertSketch(true);
 }
コード例 #2
0
ファイル: PDFArchiver.cs プロジェクト: 15831944/ArchivePDF
        public List <string> get_list_of_open_docs()
        {
            ModelDoc2     temp = (ModelDoc2)swApp.GetFirstDocument();
            List <string> ml   = new List <string>();

            temp.GetNext();
            while (temp != null)
            {
                string temp_string = temp.GetPathName();
                if (temp.Visible == true && !ml.Contains(temp_string))
                {
                    ml.Add(temp.GetPathName());
                }
                temp = (ModelDoc2)temp.GetNext();
            }
            return(ml);
        }