Hallo Zusammen,
ich schreib jetzt einen Makro um die Nut- und Bohrungtiefe abzugreifen und komme hier um etwa Hilfe zu suchen.
Die Länge/Breite sind schon erledig, die Tiefe für den Blind-Schnitt sind auch i.O. Das Problem ist, wenn der lineare ausgetragene Schnitt als "Durch alles" oder "bis nächste" eingestellt werde, kommt die Tiefe 0.
Die Code sieht so aus:
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set Feature = swModel.FirstFeature
While Not Feature Is Nothing
FeatureName = Feature.Name
FeatureTyp = Feature.GetTypeName
Select Case FeatureTyp
Case "Cut"
Set swExtrFeatData = Feature.GetDefinition
Debug.Print "FeatureName = " & FeatureName
Debug.Print "FeatureTyp = " & FeatureTyp
t1 = swExtrFeatData.GetDepth(False)
t2 = swExtrFeatData.GetDepth(True)
Debug.Print "FeatureDepth Forward = " & t1 * 1000
Debug.Print "FeatureDepth Reverse = " & t2 * 1000
.....
Ergebnis:
FeatureName = Schnitt - Bis nächste
FeatureTyp = Cut
FeatureDepth Forward = 0
FeatureDepth Reverse = 0
oder:
FeatureName = Schnitt - Durch alles
FeatureTyp = Cut
FeatureDepth Forward = 0
FeatureDepth Reverse = 0
Vielleicht hat jemand einpaar Erfahrung darüber?
Dank im Voraus
Venessa
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP