I'm slowly learning iLogic and I'm confused on the basics. I currently control several sketches of a frame generator assembly using the parameters in a dummy part file and this works perfectly. The current calculations are pretty simple: If the Overall Unit Width is 30" then the Door Width equals 28.5" or minus 1.5".
Now I want to control two sketches (part files) from the assembly level using iLogic. I've already named the parameters in the part files like door_width, door_height, unit_width, etc.
What do I need to do in the part level to prepare these files for use in an iLogic assembly?
The good news is... You don't need to do anything!
If you just want to control those parameters from the parent assembly file, then all you do is add the part-name prefix in your code:
Parameter("door_width") = 28.5
Becomes
Parameter("Part_Name:1", "door_width") = 28.5
It's good practice to remove the ":1" from the instance name. The reason is probably not applicable for what you are doing, but say the component you want to control is inserted multiple times in the assembly, then you delete the first instance. Your iLogic code would stop working because it's looking for ":1" as part of the components name.
The same syntax works for most things - like iProps:
iProperties.Value("Project", "Part Number")
Just becomes
iProperties.Value("part1:1", "Project", "Part Number")
Hope that helps.
Thanks. That makes it a little easier to understand. Now to iLogic......
Thanks! Much appreciated.
Can't find what you're looking for? Ask the community or share your knowledge.