- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Learning iLogic on my own through google and this forum as I go along, I encountered a problem I couldn't figure out on my own:
You have an iLogic rule in the top level assembly, where you also have a sub-assembly containing 25 unique parts, each part featuring a parameter named "Bird".
within the iLogic you state the following:
Dim sBird As String = "Chicken"
next you want to write the value of the variable "sBird" to the parameter named "Bird" in all the places "Bird" occurs within the sub-assembly. I would guess it goes something like:
For Each [parameter named "Bird"] In Each [partfile] In [sub-assembly]
Bird = sBird
Exit
but I honestly have no clue, as I haven't found a tangible explanation for how the "For Each"-loop works, how to use it, or what to use it for. At least nothing that I've managed to relate to what I'm trying to acheive here.
The intended result is obviously that the parameter named "Bird" in each of the part files now has the value "Chicken" after three lines of code, rather than 25 lines as exemplified below:
Parameter("partfile1:1, "Bird") = sBird
Parameter("partfile2:1, "Bird") = sBird
Parameter("partfile3:1, "Bird") = sBird
...
Parameter("partfile25:1, "Bird") = sBird
If anyone could tell me how to get this to work, or if the rational way to go about this is something else entirely, I'd be really happy to know.
Solved! Go to Solution.