I am working on an assembly of plates. I only have two kind of plates. Every 5th plate is different, so it would look like this:
xxxxKxxxxKxxxxKxxxx...
I though i was going to solve this by using pattern for the first four X plates and then mate one K plate on top. And then make a new pattern of X plates. After that i planned to use iLogic to hide all plates not relevant. But this would result in me first making a lot of patterns and mating a tall stack.
I would appreciate if someone could please help me by pointing me in a direction to solve this.
Solved! Go to Solution.
I am working on an assembly of plates. I only have two kind of plates. Every 5th plate is different, so it would look like this:
xxxxKxxxxKxxxxKxxxx...
I though i was going to solve this by using pattern for the first four X plates and then mate one K plate on top. And then make a new pattern of X plates. After that i planned to use iLogic to hide all plates not relevant. But this would result in me first making a lot of patterns and mating a tall stack.
I would appreciate if someone could please help me by pointing me in a direction to solve this.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Are you asking for an ilogic rule to set up the pattern? then be able to suppress specific instances you don't want to see?
Are you asking for an ilogic rule to set up the pattern? then be able to suppress specific instances you don't want to see?
Sort of. In the end I would like to just enter a number, lett say 7. That could generated 7 X and then deleted X number 5 and replaced it with a K.
Sort of. In the end I would like to just enter a number, lett say 7. That could generated 7 X and then deleted X number 5 and replaced it with a K.
Would you send me two sample part files, and spacing parameters. i think i under stand what you are asking, but it might require configuriing the parts to have the right planes to make the swapping easier.
Would you send me two sample part files, and spacing parameters. i think i under stand what you are asking, but it might require configuriing the parts to have the right planes to make the swapping easier.
See the attached Inventor 2023 files and code below, for an example using logic to place and constrain as a pattern, vs using an Inventor feature pattern.
Dim oCount As Integer 'get user input Try oCount = InputBox("Enter # of plates", "iLogic", Parameter("PlateCount")) Parameter("PlateCount") = oCount Catch Exit Sub End Try oPrefix = "Plate" ThisAssembly.BeginManage("Plate Group") If oCount = 0 then exit sub pad = "0" 'add the first plate and ground it Dim oComp1 As String = oPrefix & pad & 1 Components.Add(oComp1, "Plate_X.ipt“, , True) oOffset = Parameter(oComp1, "Thickness") 'add each remaining plate and costrain it to the assembly origin planes For i = 2 To oCount If i > 9 Then pad = "" Dim oCompName As String = oPrefix & pad & i If i Mod 5 <> 0 Then 'if not divisible by 5 Components.Add(oCompName, "Plate_X.ipt") Else Components.Add(oCompName, "Plate_K.ipt") End If 'constrain the plate Constraints.AddMate("", "", "XY Plane", oCompName, "XY Plane") Constraints.AddMate("", "", "YZ Plane", oCompName, "YZ Plane") Constraints.AddFlush("", "", "XZ Plane", oCompName, "XZ Plane", offset := oOffset) oOffset = oOffset + Parameter(oCompName, "Thickness") 'update offset to include this plate Next ThisAssembly.EndManage("Plate Group") ThisApplication.ActiveView.fit
See the attached Inventor 2023 files and code below, for an example using logic to place and constrain as a pattern, vs using an Inventor feature pattern.
Dim oCount As Integer 'get user input Try oCount = InputBox("Enter # of plates", "iLogic", Parameter("PlateCount")) Parameter("PlateCount") = oCount Catch Exit Sub End Try oPrefix = "Plate" ThisAssembly.BeginManage("Plate Group") If oCount = 0 then exit sub pad = "0" 'add the first plate and ground it Dim oComp1 As String = oPrefix & pad & 1 Components.Add(oComp1, "Plate_X.ipt“, , True) oOffset = Parameter(oComp1, "Thickness") 'add each remaining plate and costrain it to the assembly origin planes For i = 2 To oCount If i > 9 Then pad = "" Dim oCompName As String = oPrefix & pad & i If i Mod 5 <> 0 Then 'if not divisible by 5 Components.Add(oCompName, "Plate_X.ipt") Else Components.Add(oCompName, "Plate_K.ipt") End If 'constrain the plate Constraints.AddMate("", "", "XY Plane", oCompName, "XY Plane") Constraints.AddMate("", "", "YZ Plane", oCompName, "YZ Plane") Constraints.AddFlush("", "", "XZ Plane", oCompName, "XZ Plane", offset := oOffset) oOffset = oOffset + Parameter(oCompName, "Thickness") 'update offset to include this plate Next ThisAssembly.EndManage("Plate Group") ThisApplication.ActiveView.fit
Exactly what I had in mind! In the version 2 of the file you have also read my mind.
Thank you for your knowledge and time.
Exactly what I had in mind! In the version 2 of the file you have also read my mind.
Thank you for your knowledge and time.
Can't find what you're looking for? Ask the community or share your knowledge.