I hate iParts and iAssemblies. There, I said it. I’ve never really liked them, and I don’t think I ever will. The difficulties they cause with Vault are my primary issue, and I’ve usually just “found another way” to avoid dealing with them. I do however, love iLogic, and it’s introduction to Inventor provided a breath of fresh air for configurable components and assemblies. A relatively under-utilized, and frequently misunderstood feature in Inventor is the “Place iLogic Component” command. At this point you may be thinking “I don’t want to use iLogic, that’s all about code and stuff.” Well actually, this command doesn’t necessarily require any code to be written at all. You can think of it as “Place” and “Save Copy As” rolled into one command. It allows you to insert a unique component in an assembly and configure it’s options as you go. If you’re familiar with placing custom components from Content Center, it works in a similar way, but doesn’t require authoring in the same way, and is much more flexible. The really handy thing is, if you use it on an assembly, it will create copies of all the children as well, and fix up the references for you.
To demonstrate, I will first provide an example, with no coding required, that just allows you to place a part with size options. For a second example, I’ll use a component with a little bit of code, to really extend it’s usefulness.
So first thing first, where is it? Just click the little drop-down under the “Place Command” and you’ll see it.
Place iLogic Component Command
The steps that you go through to use it are as follows:
- Click the “Place iLogic Component” button.
- Select the file that you want to use. It needs to have been configured to allow options to be set on placement. This can be as simple as a user parameter that can be edited.
- If you have already added assembly parameters that you want to use, you can set the iLogic component properties to match, using the drop-downs. If not, you can type in a number, or just place the component and then configure it later.
- Place the component in the graphics window. If you click multiple times, multiple instances of the same configuration will be placed.
- Restart the command to place other unique instances.
I have created a quick play-by-play of these steps using Autodesk Screencast:
Place iLogic Component Workflow
You’ll notice that I first created 3 parameters in the assembly, so that I could quickly assign the lengths to the components as I placed them. This is not compulsory, but can augment some skeletal modelling workflows really nicely.
Now for something slightly more interesting. You may remember my post on “Normalizing iLogic Assemblies.” In it, I touched on “Place iLogic Component” but didn’t really explain it well. The main point of that post was to explain the need for normalising component names. Here I want to focus more on the process of placement, and the flexibility that this command gives, as well as pointing out the “Preview” window.
Consider a plate that can be various widths and lengths, but the number of holes used to fix it, depend on the size. So if it’s less than 65mm long, it only has 4 corner holes, but if it’s over 65mm in length, then it gets additional holes in the center of the long edge. You could build this with an iPart table and conditional suppression, so let’s make it change colour too. This is just a silly example, but it’s here to demonstrate a point. So, we just put the following code into the plate part to watch the named parameters and update it to suit:
If Length < 65 Then Feature.IsActive("VertCenterHoles") = 0 iProperties.PartColor = "Carbon Fiber" Else Feature.IsActive("VertCenterHoles") = 1 iProperties.PartColor = "Aluminum - Polished" End If If Width < 35 Then Feature.IsActive("HorCenterHoles") = 0 Else Feature.IsActive("HorCenterHoles") = 1 End If
Now when we place using “Place iLogic Component,” the rules will run and configure the part based on the parameters we set in the placement process. As a bonus, the “Preview” window allows us to see what the component will look like, with the parameters we have assigned, before we even place it. Just remember to hit the ‘enter’ key after entering each parameter value.
Here it is in action:
I hope this may launch a heated debate in the comments below about the pros/cons of iParts/iAssemblies. The reason I say this, is that I have seen some really effective use of them, and I suspect that there may be some use cases where they are actually a better solution than iLogic, but I haven’t found these cases yet, and I want to!