//IsIPartFactory IsIPartMember #region IEnumerable<Document> providors /// <summary> /// Returns an IEnumerable collection of Inventor.Document from a SelectSet object. /// </summary> /// <param name="selectSet">Inventor.SelectionSet</param> /// <returns>IEnumerable Document</returns> /// <exception cref="System.ArgumentNullException">Throws an error if the selection set is empty.</exception> public static IEnumerable <Document> EnumerateDocuments(this SelectSet selectSet) { if (selectSet.Count == 0) { throw new System.ArgumentNullException("The selection set was empty."); } foreach (dynamic i in selectSet) { Document tempDocument = DocumentShim.GetDocumentFromObject(i); if (tempDocument is null) { continue; } yield return(tempDocument); } }
/// <summary> /// Saves a drawing document with a file dialog shown to the user /// </summary> /// <param name="documentToWork"></param> public static void SaveWithFileDialog(this DrawingDocument documentToWork) { // Cast it to document and send it to main method that takes Document DocumentShim.SaveWithFileDialog((Document)documentToWork); }