Class AssemblyDocExtensions
- Namespace
- Hymma.Solidworks.Extensions
- Assembly
- Hymma.Solidworks.Extensions.dll
a list of useful functions for an SolidWorks.Interop.sldworks.AssemblyDoc object
public static class AssemblyDocExtensions
- Inheritance
-
AssemblyDocExtensions
- Inherited Members
Methods
GetComponentsByType(AssemblyDoc, swDocumentTypes_e, bool)
selects components of an assembly based on their document type
public static IEnumerable<Component2> GetComponentsByType(this AssemblyDoc assembly, swDocumentTypes_e swDocumentTypes, bool topLevelOnly = false)
Parameters
assemblyAssemblyDocswDocumentTypesswDocumentTypes_edocuments of this type will be returned
topLevelOnlyboolif set to false will return all the components of this assembly and its sub assemblies
Returns
- IEnumerable<Component2>
GetDistinctComponentsOfType(AssemblyDoc, swDocumentTypes_e, bool)
get a list of parts in an assembly, does not take into account qty or suppression or envelope state
public static IEnumerable<Component2> GetDistinctComponentsOfType(this AssemblyDoc assembly, swDocumentTypes_e swDocumentTypes, bool topLevelOnly = false)
Parameters
assemblyAssemblyDocswDocumentTypesswDocumentTypes_edocuments of this type will be returned
topLevelOnlyboolif set to false will return all the components of this assembly and its sub assemblies
Returns
- IEnumerable<Component2>
GetPartQty(AssemblyDoc, PartDoc, string)
get the Qty of part in a parent assembly document
public static int GetPartQty(this AssemblyDoc assembly, PartDoc thisPart, string configuration)
Parameters
assemblyAssemblyDocthisPartPartDocthe part
configurationstringreferenced configuration of the part
Returns
- int
Quantity as integer