SolidWorksMakroprogrammierung

Methode · Component2

GetCorrespondingEntity-Methode (Component2)

Liefert zu einer Fläche, Kante oder Ecke aus dem Modell der Komponente die passende in der Baugruppe.

Syntax

Function GetCorrespondingEntity( _
   ByVal Entity As Object _
) As Object
Set swFaceAssy = swComp.GetCorrespondingEntity(swFace)

Parameter

EntityObjectByVal
Eine Fläche, Kante oder Ecke aus dem Modell der Komponente.

Rückgabewert

Das passende Objekt im Kontext der Komponente.

Beispiel

' swComp ist eine Component2, etwa aus AssemblyDoc.GetComponents.
' swFace ist eine Fläche aus swComp.GetModelDoc2.
Dim swEnt As SldWorks.Entity
Set swEnt = swComp.GetCorrespondingEntity(swFace)
If Not swEnt Is Nothing Then swEnt.Select4 False, Nothing

Für Features, Skizzen und andere Objekte gibt es Component2.GetCorresponding.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2001Plus

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

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