SolidWorksMakroprogrammierung

Methode · Body2

AddProfileArc-Methode (Body2)

Legt eine Kreiskurve als Profil für Rotations- oder Extrusionsflächen an.

Syntax

Function AddProfileArc( _
   ByVal Center As Variant, _
   ByVal Axis As Variant, _
   ByVal Radius As Double, _
   ByVal StartPoint As Variant, _
   ByVal EndPoint As Variant _
) As Object
Set swKurve = swBody.AddProfileArc(vMitte, vAchse, 0.01, vStart, vEnde)

Parameter

CenterVariantByVal
Array mit drei Double-Werten X, Y, Z, der Mittelpunkt.
AxisVariantByVal
Array mit drei Double-Werten X, Y, Z, die Achse.
RadiusDoubleByVal
Der Radius in Metern.
StartPointVariantByVal
Array mit drei Double-Werten X, Y, Z.
EndPointVariantByVal
Array mit drei Double-Werten X, Y, Z.

Rückgabewert

Die Kurve (Curve).

Beispiel

' swBody ist ein leerer Körper aus PartDoc.CreateNewBody.
Dim swKurve As SldWorks.Curve
Dim dMitte(2) As Double, dAchse(2) As Double, dPunkt(2) As Double
dAchse(2) = 1                                   ' Achse Z
dPunkt(0) = 0.01                                ' Start und Ende bei X = 10 mm
Set swKurve = swBody.AddProfileArc(dMitte, dAchse, 0.01, dPunkt, dPunkt)

Bemerkungen

Es entsteht immer ein voller Kreis. Du kannst die Kurve mit Body2.CreateRevolutionSurface zu einer Rotationsfläche oder mit Body2.CreateExtrusionSurface zu einer Extrusionsfläche machen.

Zahlen-Arrays: Punkte, Richtungen und Parameter übergibst du als Double-Array, etwa Dim d(2) As Double. Mit Array(...) lieferte der Befehl in SOLIDWORKS 2024 Nothing oder False, ohne Fehlermeldung.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2001Plus

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

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