Mit Unterstützung durch:
CAD.de Login | Logout | Profil | Profil bearbeiten | Registrieren | Voreinstellungen | Hilfe | Suchen >
Beiträge: 52Registriert: 23.10.2006
ich habe eine Schleife, in der alle Feature-Typen eines Bauteils abgefragt werden. Bei der Rippe rauscht er durch, die wird nicht erkannt.VBA:
Code:Sub Finde_Rippe()Dim oDoc As DocumentSet oDoc = ThisApplication.ActiveDocumentDim oPartDef As PartComponentDefinitionSet oPartDef = oDoc.ComponentDefinitionDim oFeature As PartFeatureDim counter As Integercounter = 0For Each oFeature In oPartDef.Features counter = counter + 1 If oFeature.Type = kRipFeatureObject Then Stop End If NextDebug.Print (counter)End Sub
Dim oDoc As DocumentSet oDoc = ThisApplication.ActiveDocument
Dim oPartDef As PartComponentDefinitionSet oPartDef = oDoc.ComponentDefinition
Dim oFeature As PartFeature
Dim counter As Integercounter = 0
For Each oFeature In oPartDef.Features
counter = counter + 1 If oFeature.Type = kRipFeatureObject Then Stop End If Next
Debug.Print (counter)
End Sub
counter zeigt die richtige Anzahl, aber "Stop" wird nie erreicht.Gleiches Problem in c# 2008
Code:// Features durchsuchen:PartFeatures oFeatures = oPartDef.Features;foreach (PartFeature oFeature in oFeatures){ switch (oFeature.Type) { case ObjectTypeEnum.kRipFeatureObject:
Ich stehe vor einem Rätsel. Kann das jemand nachvollziehen oder ist das bekannt?
Gruß,Christoph
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP
Beiträge: 2912Registriert: 15.11.2006
Windows 10 x64, AIP 2020-2025
Vielleicht weil eine Rippe ein RibFeature ist und kein RipFeature?
------------------MfGRK
Anzeige.:X
Anzeige: (Infos zum Werbeplatz >>)
|
(c)2025 CAD.de | Impressum | Datenschutz