PunkR0ckz Posted May 22, 2010 Share Posted May 22, 2010 Hi guys, I've been working on this project for the past 2 months and everything was going smoothly till now. My project consists of multiple conveyors and there are some subassembly that can be there more than once and I need to use iLogic code. I am able to use the Component.Replace function to replace a subassembly by another one properly. My problem is how Inventor deals with part's/subassembly's name in the treelist. Example of my problem: I have 5 subassembly in my main assembly: Conveyor End:1, Conveyor Line:1, Conveyor Line:2, Conveyor Motor:1, Conveyor End:2 If my "zone" = 4, I want this to be; Conveyor End:1, Conveyor Bladder:1, Conveyor Line:1, Conveyor Motor:1, Conveyor End:2 If my "zone" = 3, I want this to be; Conveyor End:1, Conveyor Motor:1, Conveyor Line:1, Conveyor Motor:2, Conveyor End:2 If I use the Component.Replace line, I will be able to change my main ass'y Conveyor Line:1 by Conveyor Bladder:1 and by Conveyor Motor:1, but if I want to change my zones again, it will not work since there would be Conveyor Motor:2 instead of Conveyor Motor:1 and vice-versa in the treelist. If someone has a simple solution to this problem, any ideas would be welcome! Note: I am a big newbie with iCodes (second day using it, first project!) Note 2: A sample of my iCode has been attached to this post, to show How I would like it to work. Replacement of a part.txt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.