Problem with RectangularPatternFeature

Problem with RectangularPatternFeature

dhaverstick
Advocate Advocate
734 Views
2 Replies
Message 1 of 3

Problem with RectangularPatternFeature

dhaverstick
Advocate
Advocate

I am creating a rectangular pattern feature on an unfolded sheet metal part. Below is the code I'm using.

 

Dim PatternFeatures As Inventor.ObjectCollection = InventorApp.TransientObjects.CreateObjectCollection
PatternFeatures.Add(DimpleExtrudeFeature)

Dim RectangularPatternDef As Inventor.RectangularPatternFeatureDefinition
RectangularPatternDef = TempPlateSectionComponentDef.Features.RectangularPatternFeatures.CreateDefinition(PatternFeatures, SketchXAxis, True, TempPlateZoneInstance.NumberOfSpotsLength1, TempPlateZoneInstance.SpotSpacingCalculatedLength1 * InchesToCentimeters)
RectangularPatternDef.XDirectionMidPlanePattern = False
RectangularPatternDef.YDirectionEntity = SketchYAxis
RectangularPatternDef.NaturalYDirection = True
RectangularPatternDef.YDirectionMidPlanePattern = False
RectangularPatternDef.YSpacing = TempPlateZoneInstance.RowSpacingCalculated * InchesToCentimeters
RectangularPatternDef.YCount = TempPlateZoneInstance.NumberOfRows
RectangularPatternDef.ComputeType = PatternComputeTypeEnum.kOptimizedCompute

Dim RectangularPatternObj As Inventor.RectangularPatternFeature
RectangularPatternObj = TempPlateSectionComponentDef.Features.RectangularPatternFeatures.AddByDefinition(RectangularPatternDef)

 

The rectangular pattern feature is created but no matter whether I set the NatureYDirection property to true or false in the definition, it always creates the feature  with the property set to false. I then have to go reset it to true in the rectangularpatternfeature object. 

 

Does anyone have any ideas what might be causing this?

 

Thanks,

 

Darren Haverstick

Paul Mueller Company

 

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

JaneFan
Autodesk
Autodesk
Accepted solution

Hi @dhaverstick,

It seems an issue to me that setting NaturalYDirection doesn't work for the unconsumed pattern feature definition, that the work around we can find is just as you said, set it to True after the pattern feature being created.




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 3 of 3

dhaverstick
Advocate
Advocate

I seem to have a gift for finding obscure "features" in Autodesk APIs. While I'm not crazy about the work around, it does give me the end result I want so I guess I'll call it a win.

 

Thanks for the reply!

 

Darren

0 Likes