Circular pattern feature in assembly

Circular pattern feature in assembly

breinkemeyer
Enthusiast Enthusiast
264 Views
2 Replies
Message 1 of 3

Circular pattern feature in assembly

breinkemeyer
Enthusiast
Enthusiast

trying to pattern a bolt hole feature in assembly.  It fails to create the pattern definition.

 

// and add the hole pattern
oICollecton = .oITransObj.CreateObjectCollection();
oICollecton.Add(oIExtrudedFeatures[oIExtrudedFeatures.Count]);
if (endData.FileType3D == ".ipt")
{
oICirclePatternDef = oICirclePatternFeatures.CreateDefinition(oICollecton, oISMCompDef.WorkAxes[1], false, 4, oDeg, true);
}
else
{
oICirclePatternDef = oICirclePatternFeatures.CreateDefinition(oICollecton, oIAssyCompDef.WorkAxes[1], false, 4, oDeg, true);
}
oICirclePatternFeature = oICirclePatternFeatures.AddByDefinition(oICirclePatternDef);
oICirclePatternFeature.Name = "Flange Brg Bolt Pattern";

 

It works fine for the sheet metal file but not the assembly.  Am I missing something?

0 Likes
Accepted solutions (1)
265 Views
2 Replies
Replies (2)
Message 2 of 3

A.Acheson
Mentor
Mentor

Hi @breinkemeyer 

Assembly level patterns are similar but different than there part level counterparts. 

 

One major one is you need to tell the pattern about its participants. See help page here.

Syntax

CircularPatternFeature.AddParticipantOccurrence As ComponentOccurrence )

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 3

breinkemeyer
Enthusiast
Enthusiast
Accepted solution

So it turns out the easy fix is to replace the addbydefinition method with the add method...

 

oICirclePatternFeature = oICirclePatternFeatures.Add(oICollecton, oIWorkAxes[1], true, 4, "360 deg", true);

0 Likes