Sweep with selected edge

Sweep with selected edge

NachoShaw
Advisor Advisor
433 Views
1 Reply
Message 1 of 2

Sweep with selected edge

NachoShaw
Advisor
Advisor

Hi

 

Having a little issue with a Sweep function. Im selecting an edge in the part and need to use that edge as the path but i get a Type Mismatch. I tried to set the edge as a path (which is what the  sweep command is looking for) but then i get a 'Failed to createPath' error....

 

By selecting an edge or having an edge selected, how would i use the edge as the path or convert it to a path for the sweep function?

 

Dim oEdge As Edge: Set oEdge = oApp.CommandManager.Pick(kPartEdgeFilter, "pick edge")
oEdgeSet.AddItem oEdge

Dim oPath As Path
Set oPath = oCompDef.Features.CreatePath(oEdge)

Dim oProfile As Profile
Set oProfile = oSketch.Profiles.AddForSolid

Dim spDef As SweepDefinition
Set spDef = oCompDef.Features.SweepFeatures.CreateSweepDefinition(kPathSweepType, oProfile, oPath, kCutOperation)

Dim sp As SweepFeature
Set sp = oCompDef.Features.SweepFeatures.Add(spDef)

 

do i need to convert the selected edge to something else? if so, what?

do i need to create a line in place of the edge? if so, how because i cant access the edge end points?

 

 

 

 

Thanks

 

 

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Accepted solutions (1)
434 Views
1 Reply
Reply (1)
Message 2 of 2

NachoShaw
Advisor
Advisor
Accepted solution

Fixed it with a 3D sketch

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes