iLogic external rule Inventor 2013 - Find Component Place into a New .iam

iLogic external rule Inventor 2013 - Find Component Place into a New .iam

Anonymous
Not applicable
1,438 Views
24 Replies
Message 1 of 25

iLogic external rule Inventor 2013 - Find Component Place into a New .iam

Anonymous
Not applicable

Hello everyone!!!  I posted this exact question in, what I think, the wrong section of this forum.

 

I am trying to write a rule that will allow me to "Find Component" by "Part Number" of an assembly and place them in another assembly.

 

Example: I have Part 1,2,3,4 etc....  and that part might have many different features on it (Part 1.1, Part 1.2, Part 2.1, Part 2.2, Part 3.1 etc...)

 

I need all "Part 1's" to go in to an assembly and all "Part 2's" in separate assembly and so on, so that I can reference the new Part 1.iam for a fab table.

 

Any help would be greatly appreciated.

 

Thank you,

Dylan Stewart

0 Likes
1,439 Views
24 Replies
Replies (24)
Message 21 of 25

Owner2229
Advisor
Advisor

Hi, Im open for other projets as well.

I wrongly thought you want to place only one of each of the parts in new assemblies. I'm gona change it to look for component occurence instead of referenced documents. It will then place in new assemblies the same amount as was in the original assembly.

I also think that I know why it send all the RUCW8944 in wrong assembly. I'll fix it as well.

 

Another thing is: Don't you mind that in the new assemblies are all the parts placed in one place? My point is that if you're using it only for some kind of data gathering then it should be OK, but if you want to use the new assemblies for something else, then you'll probably wont them to be in the same position as in the original assembly. I can look at it as well if you want. The parts would have to take theyr Matrix from the original assembly.

 

I'm also sorry, but I'm gonna write the code at monday (when I'll be at work), as I have all my snippets there. Just let me know about the question above and if you have some more functions, which you'll want to add to this rule, then let me know to.

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes
Message 22 of 25

Anonymous
Not applicable

I don't think I ever specified if I wanted all or just one instance, sorry about the lack of my communication.

 

As for the parts being placed in the new assemblies, that really isnt a concern to me. We use these iam for data reference only.

 

Thank you so much for the help. I really would like to know how to do this. I use simple examples from online but I have yet to see someone break down the syntax and the structure and how the code should be written.

 

As for some of the other projects, one on my plate right now that is giving me trouble is placing parts automatically on templates.

It works great for one part only, but when I try and make a package of drawings, it gets a messed up.

 

I have another thread going in this forum titles "Rule to Reference Accompanying on DWG in Package"

 

I have a list of a few things that I have been working on to try and solve my problem.

 

 

How did you learn to make these rules? I am just a student at the moment, but would really like to be able to modify Inventor and actually know how it all works.

 

Thank you,

Dylan Stewart

0 Likes
Message 23 of 25

Owner2229
Advisor
Advisor

Hi, in attachment you have the updated rule (with some descriptions, so you can learn from it).

 

As for the other projects I would prefer creating new thread in this forum. It would give the opportunity to others if I would be unable to help you with something.

 

I have learned how to create these rules just by looking at snipsets / searching for code samples here on this forum or just googling it. And simply by trying what the code does 😄 Just create some new documents in separated folder (so you don't mess up your projects) and play with them.

 

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes
Message 24 of 25

Anonymous
Not applicable
I'm still having issues with this code bringing in RUCW8944 in to the RUCW8945 assembly... I've tried it a few times and get the same results every time.

Could it be something wrong with my model?

I wouldn't think so because I look at the master assembly and the STOCK NUMBER is different....

I'm stumped.
0 Likes
Message 25 of 25

Owner2229
Advisor
Advisor

Im unable to replicate your problem. I did try this rule on my models and it worked properly.

Are RUCW8944 and RUCW8945 regular parts or iParts? I.e. Are they saved in separated files?

 

It's strange that it works for 4/5 of the parts, so I'm assuming that there is something wrong with the RUCW8944 parts.

 

Not even the position of parts in part tree affects that.

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes