I am new to iLogic. I have an assembly which I want to replace one of the parts with one of four other parts.
My code reads:
Select Case Width
Case "750"
Component.Replace("part:1", "L:\Drawings\part2", True)
End Select
This works fine and when 750 is selected, part1 is replaced with part2.
My problem is then if I want to select "1000" I don't know the part name which I will be replaced by part3 as this could be part1, part2, part4,or part5.
Thanks
Hi,
If you have the same order in your assembly, you can create a list of all components and then you can use the item number of this component to get it's name.
So you don't say change "Part1:1", you can say Array(0).Name instead.
Only as an idea
Best Regards
Passi
Hi, try this:
change the name in the browser to a fixed name such as "Base". The refer to this name in your ilogic program. This will ensure that ilogic always finds the same name in the browser. the name will still display correctly on your idw.
Hope it helps
@Anonymous wrote:I am new to iLogic. I have an assembly which I want to replace one of the parts with one of four other parts.
My code reads:
Select Case Width
Case "750"
Component.Replace("part:1", "L:\Drawings\part2", True)
End Select
This works fine and when 750 is selected, part1 is replaced with part2.
My problem is then if I want to select "1000" I don't know the part name which I will be replaced by part3 as this could be part1, part2, part4,or part5.
Thanks
In browser, rename the part name to a common name and use it in your ilogic. For ex.
In browser window, rename Part:1 as X and the rule ll be
Select Case Width
Case "750"
Component.Replace("X", "L:\Drawings\part2", True)
End Select
Can't find what you're looking for? Ask the community or share your knowledge.