| | | 1 | | using System; |
| | | 2 | | |
| | | 3 | | namespace SolidEdgeCommunity.Extensions; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// SolidEdgeFramework.SolidEdgeDocument extension methods. |
| | | 7 | | /// </summary> |
| | | 8 | | public static class SolidEdgeDocumentExtensions |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Returns the version of Solid Edge that was used to create the referenced document. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <param name="document"></param> |
| | | 14 | | /// <returns></returns> |
| | 1 | 15 | | public static Version GetCreatedVersion(this SolidEdgeDocument document) => new(document.CreatedVersion); |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Returns the version of Solid Edge that was used the last time the referenced document was saved. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <param name="document"></param> |
| | | 21 | | /// <returns></returns> |
| | 1 | 22 | | public static Version GetLastSavedVersion(this SolidEdgeDocument document) => new(document.LastSavedVersion); |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Returns the properties for the referenced document. |
| | | 26 | | /// </summary> |
| | | 27 | | /// <param name="document"></param> |
| | | 28 | | /// <returns></returns> |
| | 1 | 29 | | public static PropertySets GetProperties(this SolidEdgeDocument document) => document.Properties as PropertySets; |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Returns the summary information property set for the referenced document. |
| | | 33 | | /// </summary> |
| | | 34 | | /// <param name="document"></param> |
| | | 35 | | /// <returns></returns> |
| | 1 | 36 | | public static SummaryInfo GetSummaryInfo(this SolidEdgeDocument document) => document.SummaryInfo as SummaryInfo; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Returns a collection of variables for the referenced document. |
| | | 40 | | /// </summary> |
| | | 41 | | /// <param name="document"></param> |
| | | 42 | | /// <returns></returns> |
| | 1 | 43 | | public static Variables GetVariables(this SolidEdgeDocument document) => document.Variables as Variables; |
| | | 44 | | } |