Class PartDocExtensions
- Namespace
- Hymma.Solidworks.Extensions
- Assembly
- Hymma.Solidworks.Extensions.dll
extensions for SolidWorks.Interop.sldworks.PartDoc
public static class PartDocExtensions
- Inheritance
-
PartDocExtensions
- Inherited Members
Methods
GetBodyByName(PartDoc, string, bool)
gets the body of this partDoc by its name and null if doesn't exist
public static Body2 GetBodyByName(this PartDoc part, string name, bool visiblesOnly = false)
Parameters
partPartDocthe part document
namestringthe name of the body
visiblesOnlybooltoggle to return visible bodies or not
Returns
- Body2
GetCutListFolder(PartDoc, Body2, SldWorks)
get cut list folder of this part for a specific body.
public static Feature GetCutListFolder(this PartDoc part, Body2 body, SldWorks solidworks)
Parameters
partPartDocbodyBody2a sheetMetal or WeldMent body
solidworksSldWorks
Returns
- Feature
GetFeaturesByTypeName(PartDoc, string)
get a IList<T> of features
public static IList<Feature> GetFeaturesByTypeName(this PartDoc part, string featureType)
Parameters
partPartDocfeatureTypestringthe feature type, refer to this link to for a list of types as string
Returns
- IList<Feature>
GetFlatPatterns(PartDoc)
Get flat patterns of the part document if there is any
public static object[] GetFlatPatterns(this PartDoc part)
Parameters
partPartDocthe sheet metal modelDoc2 object
Returns
- object[]
an array of objects that can be cast to SolidWorks.Interop.sldworks.Feature
GetSheetMetals(PartDoc)
gets the sheetMetal Features of this part document if there is any
public static object[] GetSheetMetals(this PartDoc part)
Parameters
partPartDocthe sheet metal modelDoc2 or PartDoc object
Returns
- object[]
an array of objects cast-able to SolidWorks.Interop.sldworks.Feature
IsSheetMetal(PartDoc, out swSMBendState_e)
determines if a part is sheetmetal or not
public static bool IsSheetMetal(this PartDoc part, out swSMBendState_e bendState)
Parameters
partPartDocbendStateswSMBendState_ebend state of the part as defined by SolidWorks.Interop.swconst.swSMBendState_e