Table of Contents

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

part PartDoc

the part document

name string

the name of the body

visiblesOnly bool

toggle 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

part PartDoc
body Body2

a sheetMetal or WeldMent body

solidworks SldWorks

Returns

Feature

GetFeaturesByTypeName(PartDoc, string)

get a IList<T> of features

public static IList<Feature> GetFeaturesByTypeName(this PartDoc part, string featureType)

Parameters

part PartDoc
featureType string

the 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

part PartDoc

the 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

part PartDoc

the 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

part PartDoc
bendState swSMBendState_e

bend state of the part as defined by SolidWorks.Interop.swconst.swSMBendState_e

Returns

bool