Hello, it's been a while since I've logged in, but here is my issue.
We are trying to drive automated assemblies in Inventor using iLogic and iParts. The iParts contain all the information to identify themselves in our MRP system.
If I create just a single assembly, and add 1 iPart, the iLogic will change the component properly.
(Example: iPart.ChangeRow("BushingMtgPlate:1","492"))
This example line changes the main iPart to row using member name 492.
If I add any component to the assembly, another iPart or a simple part, the iLogic rule states that there is no member row found for the part 492.
I must be missing something, but can anyone help? I've got to string about 4-6 parts together this way and have them change according to the main part that is inserted later through an iTrigger of some sort.
Tom,
I think I could help you if I had some more information.
What drives your iPart to change to a certain member?
Are you using a form?
I'll send you a pack n go example that I have created and seems to work.
Len
Tom,
Have you "stabilized" the name of the component you are replacing (swapping out row members) in the Inventor model tree.
Most likely this is your issue
I have attached the assembly with the three basic components. The information in the custom iProperties fields in the bushing (the 55...ipt part) will eventually pass it's information on to the plates below it, and the eventual attachment to a tank wall that isn't included here. I've attached the two iParts, assembly, and standard part for the example.
The first item I need to do is make an iLogic rule that will dictate to the plate and bushing what size they need to be from the iProperties of the bushing. The only thing I was trying to do first was create an iLogic rule to simply change the plate and bushing:
iPart.ChangeRow("BushingMtgPlate:1","491")
iPart.ChangeRow("BushingMtgPlateGasket:1","491-Gasket")
iLogicVb.UpdateWhenDone=True
Following this, I got the previous error if I try to change them again. Later on I found that the only way to do it is to open each part, regen all, save, regen all, and save again, then regen the main assembly, then it would work. That is not acceptable.
Eventually, I would have to get the "491" from the iProperties of the bushing and substitute that into the iPart.Changerow statement. This may be too much to bite on at first in one post, I do apologize for that.
- Version 2013, and I don't have a choice as to the part being substituted in the model as far as I know. I also cannot have the library components being changed later on. So the regen/save routine is also a no go.
Any Ideas? I'm considering trying to do a VBA program to do the selection routines and match mates by name. That seems to be the only way out I have right now.
"Following this, I got the previous error if I try to change them again"
you need to "stabilize" the name of the component , otherwise the ilogic rule will work only the first time
I don't know what is required to "stabilize" the assembly. How would you go about doing that?
(Thanks for the responses all)
You must manually change the component name assigned in order to "stabilize" it so it will not change when the table configuration row is modified.
To do this find the component in the Inventor model tree panel, click on it twice (slowly) this will allow you to rename the component. Use the new name in your ilogic code
Tom,
I believe Swordmaster is correct.
I'm still using Inventor 2012, so I wouldn't be able to open your assembly to check for myself.
This "Stabilizing" workflow must be followed in order for your iLogic code to operate correctly.
If you still do not understand what we're talking about, send me a private message and I'll help you further.
Len
I did rename it in the browser, but it still will not change the row a second time (or more) without the rebuild all / save option.
I'm investigating another option to try to avoid the iPart designation.
This should work, there must be something wrong. Did you use the stabilized name in the ilogic code?
Did you generate the ipart members prior to running the replace code?
What ilogic error messages do you get?