- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am having trouble figuring out how to have iLogic place multiple copies of a custom iPart and change the individual parameters.
I am trying to make iLogic rule to generate a grid of baffles that have a traveling wave pattern. I have a custom iPart for the baffle that has the length and thickness as keys and the amplitude of the wave pattern as a custom key. What I would like to do is have an iLogic rule that will take parameters from the user like spacing between baffles and place the parts and adjust each ones amplitude to whatever is required based on the other parameters.
Attached is a test file I have been working on with the following rule.
ThisAssembly.BeginManage()
Dim componentA = Components.AddiPart("", "Waves.ipt", 2, position := Nothing, grounded := False, visible := True, appearance := Nothing)
Dim componentB = Components.AddiPart("", "Waves.ipt", 2, position := ThisDoc.Geometry.Point(0,0,4), grounded := False, visible := True, appearance := Nothing)
iPart.ChangeRow(componentB.Name, iPart.RowNumber(componentB.Name), 1 in)
ThisAssembly.EndManage()
I can place the parts successfully using the AddiPart but the only way I can find to change the custom parameter is using the ChangeRow function which alters the member file used by both of the parts. It was my understanding that custom iParts were supposed to generate a unique file for each part instead of reusing standard member files but that doesn't seem to be the case. If I place the iParts manually it creates seperate files for each but for my purposes I want to be able to create these parts through the iLogic.
So how do I get the iLogic to generate unique part files as I add new parts?
Solved! Go to Solution.