SolidWorksMakroprogrammierung

Eigenschaft · FeatureStatistics

Features-Eigenschaft (FeatureStatistics)

Liefert die Features im Teil.

Syntax

Property Features As Variant
vFeatures = swStat.Features

Wert

Array der Features (Feature).

Die Eigenschaft ist nur lesbar.

Beispiel

' swStat ist die Feature-Statistik (FeatureStatistics), etwa aus FeatureManager.FeatureStatistics.
Dim vFeatures As Variant
Dim swFeat As SldWorks.Feature
Dim i As Long
swStat.Refresh
vFeatures = swStat.Features
If IsArray(vFeatures) Then
    For i = 0 To UBound(vFeatures)
        Set swFeat = vFeatures(i)
        Debug.Print swFeat.Name & " [" & swFeat.GetTypeName2 & "]"
    Next i
End If

Bemerkungen

Mit den Features kommst du von der Statistik zum Feature selbst, etwa um das langsamste Feature auszuwählen oder zu unterdrücken. Dass die Reihenfolge zu FeatureStatistics.FeatureUpdateTimes passt, sagt die Hilfe nicht ausdrücklich. Das Hilfebeispiel „Get Part's Feature Statistics“ liest Features zwar, wertet das Array aber nicht aus.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2010

Englisches Original: IFeatureStatistics::Features in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)

Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.