- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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.
Solved! Go to Solution.