- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've bassicaly got the some question as @DRoam ... However, I'm keen on using iLogic so I'm curious if it is possible.
I'm currently checking if a property of all parts in an assembly (and subassamblies) have a property "IO Type" and if this IO Type contains cable, I want to know to what part this is attached. The code is working;however, I'm struggling with the same part as @DRoam... If the cable is directly constrained to a part I'm retrieving the part, but when the cable is connected to a subassembly, I'm retrieving the subassembly.
I'm wondering if it is possible to retrieve the part? I read something about proxy but I don't know how to use that and if it can be achieved using proxy.
Keep in mind that the code below is part of a bigger code. This is just the part that checks if the part contains the property and if that property equals cable.
If sFileName.Contains(".ipt") And sBomstructure.Contains("kPurchased") And Not sFileName.Contains("DIN") And Not sFileName.Contains("ISO") Then Try IOType = iProperties.Value(sFileName, "Custom", "IO Type") Catch End Try If IOType <> "" Then sPartNumber = iProperties.Value(sFileName, "Project", "Part Number") 'Everything contains a Part Number Try sFabricationNumber = iProperties.Value(sFileName, "Custom", "Fabrication Number") 'Not everything has a fabrication number Catch End Try If IOType = "Cable" Then 'Check to what assembly/part the cable is connected. For Each CableConstraint As AssemblyConstraint In oComp.Constraints If Not IsNothing(CableConstraint.OccurrenceOne) And Not IsNothing(CableConstraint.OccurrenceTwo) Then If CableConstraint.OccurrenceOne.Name <> oComp.Name Then IOAttached = CableConstraint.OccurrenceOne.Name Else IOAttached = CableConstraint.OccurrenceTwo.Name End If Exit For End If Next End If End If End If
Solved! Go to Solution.