Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi, To create a swepp with a single line route, for example, you could use something like this. Sketch1 is the sketch of the profile, and sketch2 is the sketch of the route.

 

Dim oPartDoc As PartDocument = ThisDoc.Document
Dim oCompDef As PartComponentDefinition = oPartDoc.ComponentDefinition
' Create a profile.
Dim oSketch1 As Sketch = oCompDef.Sketches.Item("Sketch1")
Dim oProfile As Profile = oSketch1.Profiles.AddForSolid
' Create a path.
Dim oSketch2 As Sketch = oCompDef.Sketches.Item("Sketch2")
Dim oPath As Path = oCompDef.Features.CreatePath(oSketch2.SketchLines(1))

' Create the sweep feature.
Dim oSweep As SweepFeature = oCompDef.Features.SweepFeatures.AddUsingPath(oProfile, oPath, kJoinOperation)

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn