Message 1 of 13
Create a Rectangular pattern of solids with iLogic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I having problems achieving a rectangular pattern of solids with ilogic. This is my code so far.
' Create new pattern of solids Dim oPD As PartDocument = ThisDoc.Document Dim oPCD As PartComponentDefinition = oPD.ComponentDefinition Dim Zaxis As Object = oPCD.WorkAxes.Item(3)' Select Z Axis Dim SB_ObjCol As ObjectCollection SB_ObjCol = ThisApplication.TransientObjects.CreateObjectCollection For i = 1 To 5 ' Add the first 5 solid bodies to the object collection SurfBody = oPCD.SurfaceBodies.Item(i) SB_ObjCol.Add(SurfBody) Next Dim qtypattern As Integer qtypattern = 2 ' Define Number of Pattern DistPrompt1 = 2000 ' Define Distance of Pattern Dim oRecFeat As RectangularPatternFeature oRecFeat = oPCD.Features.RectangularPatternFeatures.Add(SB_ObjCol, Zaxis, True, qtypattern, DistPrompt1, kDefault, , , , , , , , kAdjustToModelCompute, kAdjustToDirection1) oRecFeat.PatternElements.PatternOfBody = True oRecFeat.Definition.Operation = kNewBodyOperation 'rename pattern oRecFeat.Name = "SolidPattern"
Any suggestions?
Best regards Emil Jakobsen