Before using iLogic, I created lot of iAssembly and iPart. I could change iPart factory member when I need in iAssembly.
Now, I want to move everything to iLogic.
My question is: how could I change the part by iLogic code?
For example:
I generated "Part1.ipt" and "Part2.ipt",...... (I have hundred of member)
In my assembly, sometimes, I need use Part1.ipt, sometimes I need use Part2.ipt.
Which is the iLogic Code I should to use?
Inventor 2009, WIN XP.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Working on this myself but you may get more responses in the Autodesk Inventor Customize
iParts/iAssemblies do NOT play well with iLogic. You WILL have many many problems.
However, there is a snippet for this in the default snippets of the iLogic editor.
This is the snippet: iPart.ChangeRow("iComponentName:1", "RowMemberName")
Thanks. But I do not want use any excel in my assembly anymore. I want create everything automaticly.
Let me explain:
Forget iPart and iassembly.
I created myPart.ipt with ilogic rule which could generate different parts as part1.ipt, part2.ipt, and so on (Hundreds of them).
I created myAssembly.iam with part1.ipt.
I want to write some iLogic Rule to change part1.ipt to part2.ipt.
Hope I make myself be understand now.
Hi zdhrichard,
Something such as this should work for you. Note that you must specify both the part name:
Component.Replace("Part1:1", "C:\Temp\Part2.ipt", True)
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Also note:
True : replace all instances of this component
False : replace only the single instance that you name Part1:9 replaces only instance 9.
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Sorry but I don't use iparts.. I will make them and generate the files and make a folder called hardware or whatever it is break the link from master ipart. I have found as nice as iparts are they will slow down inventor like you never thought it would.
Great.
This is what I want.
Thanks lot.
HIi!
It's possible to replace a part with a iproperties custom name?
NEWPART = IProperties.Value("Custom", "MYPART")
Component.Replace("MYPART", "C:MYPART\QU001155_00.ipt", True)
Thanks for your help 🙂
I'm not sure I understand your question. Are you asking if you can use an assembly property to specify the file path and name of a part that you want the rule to replace "MYPART" with? If that's the case then:
NEWPART = IProperties.Value("Custom", "MYPART") Component.Replace("MYPART", NEWPART, True)
This wants NEWPART to be a string containing the full file path.
Hi Curtis,
Now suppose those part names and their file paths have been changed in the design assistant is there a way the ilogic rule automatically updates with the new name?
To be more clear i am looking for a solution for the following
Thanks,
Sid
using inventor 2011