Select set and function member being cancelled

Select set and function member being cancelled

NachoShaw
Advisor Advisor
426 Views
1 Reply
Message 1 of 2

Select set and function member being cancelled

NachoShaw
Advisor
Advisor

Hey

 

this is a strange one for me, hopefully i can get answer to-

 

I am create a Face member

Dim oFace As Face

Set oFace = oApp.CommandManager.Pick(kAllPlanarEntities, "pick face 1")

 

I use this face with another face selection to get an edge (see other recent posts)

 

long story short, when i run a Sweep function, oFace becomes empty. I am checking the Edge count and the moment the Sweep is initiated, i lose the face and edge count. I added an ObjectCollection and assigned the face to it which still remains in the collection after the Sweep but i am unable to reasign oFace as the Collection object... There is only 1 face in the collection

 

What could cause this behavior? I have turned off any error trapping and nothing is occurring.. My Sweep code is this

 

Dim oSketch As PlanarSketch
Set oSketch = oCompDef.Sketches.Add(oWP, False)

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

Dim oLine As SketchLine3D
Set oLine = oSketch3D.Include(oEdge)

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

Dim SweepFeats As SweepFeatures
Set SweepFeats = oPartDoc.ComponentDefinition.Features.SweepFeatures

Dim spDef As SweepDefinition
Set spDef = SweepFeats.CreateSweepDefinition(kPathSweepType, oProfile, oPath, kCutOperation)

Dim sp As SweepFeature
Set sp = SweepFeats.Add(spDef) 'this line changes oFace to nothing



 

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
427 Views
1 Reply
Reply (1)
Message 2 of 2

NachoShaw
Advisor
Advisor

realised that when the Sweep Feature was implemented, the original selected face no longer existed as it was different.

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