//создает проект детали public void CreateDoc() { swApp = new SldWorks { Visible = true }; swApp.NewPart(); swDoc = swApp.GetFirstDocument(); swDoc.SketchManager.InsertSketch(true); }
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); }