Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In this assembly, I want to generate the full assembly on the [Primary] model state, and then add a second model state to isolate a few pieces (just one stack of occurrences in the y-direction). For the full assembly, I want the rectangular pattern to be parameter driven in both the x- and y- direction, but in the second model state I want to change the number of occurrences in the x direction only to 1. But when I look through the members of "RectangularOccurrencePattern" the number of columns is a read-only property. Is there a way to change that?
Dim AOCC1 = Components.AddWithModelState("A1", partPath, "[Primary]", , True) Dim AOCC2 = Components.AddWithModelState("A2", partPath, "[Primary]") Dim BOCC1 = Components.AddWithModelState("B1", partPath, "B BLOCK") Dim TBOFFSET As Double = WINHT + RTOPINS + RBOTINS 'TOP & BOTTOM A BLOCKS Constraints.AddMate("TOPBOTTOM",AOCC1,"BOTTOM",AOCC2,"TOP",TBOFFSET) Constraints.AddFlush("AAFRONT",AOCC1,"FRONT",AOCC2,"FRONT") Constraints.AddFlush("AARIGHT", AOCC1, "RIGHT", AOCC2, "RIGHT") If REACTYPE = 1 'NORMAL Dim COCC1 = Components.AddWithModelState("C1", partPath, "C BLOCK") 'THIS IS THE ONLY REACTYPE THAT USES A C BLOCK, SO ADDING IT HERE Constraints.AddMate("C1BOTL",COCC1,"BOTTOM",AOCC2,"TOP",RTOPINS) 'CONSTRAINS C BLOCK TO BOTTOM LEFT SO PATTERNS ARE POSITIVELY DIRECTIONAL Constraints.AddMate("B1BOTL",BOCC1,"BOTTOM",COCC1,"TOP",REALGAP) 'CONSTRAINS B BLOCK TO BOTTOM LEFT SO PATTERNS ARE POSITIVELY DIRECTIONAL Constraints.AddFlush("CFRONT", AOCC1, "FRONT", COCC1, "FRONT") Constraints.AddFlush("BFRONT", AOCC1, "FRONT", BOCC1, "FRONT") Constraints.AddFlush("CLEFT", AOCC1, "LEFT", COCC1, "LEFT") Constraints.AddFlush("BLEFT", AOCC1, "LEFT", BOCC1, "LEFT") Dim XPATT As Double = WINWID + STRIP 'WIDTH OF PATTERN ACROSS CORE Dim YPATTC As Double = WINHT - CBLOCK 'C BLOCK PATTERN VERTICAL DIST Dim YPATTB As Double = REALGAP + BBLOCK45 'B BLOCK PATTERN VERTICAL DIST Dim BROWS As Integer = GAPS - 1 'NUMBER OF B BLOCKS Dim Cpatt = Patterns.AddRectangular("CBLOCKS", COCC1, LEGS, XPATT, Nothing, "X Axis", _ columnNaturalDirection := True, rowCount := 2, rowOffset := YPATTC, rowEntityName := "Y Axis", rowNaturalDirection := True) 'B BLOCK PATTERN Dim Bpatt = Patterns.AddRectangular("BBLOCKS", BOCC1, LEGS, XPATT, Nothing, "X Axis", _ columnNaturalDirection := True, rowCount := BROWS, rowOffset := YPATTB, rowEntityName := "Y Axis", rowNaturalDirection := True) oModelStates.Add("LEG") Component.IsActive("A1") = False Component.IsActive("A2") = False
'... and then i have no idea how to change the amount of columns in Bpatt & Cpatt to 1
Solved! Go to Solution.