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