Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I'm trying to write an iLogic rule to find a frame generator assembly from one if its sub parts.
The user selects a part in the assembly and if it is flagged as a frame generator part by an iproperty value then I want to get the part number/filename of the frame generator assembly.
Is this possible? See existing code below
Sub main() Dim oPart As ComponentOccurrence Dim Prop As String Dim oDoc As Document oPart = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select component") If oPart Is Nothing Then Exit Sub Else oDoc = oPart.Definition.Document 'MessageBox.Show(oDoc.DisplayName, "Document Name") 'MessageBox.Show(oDoc.FullFileName, "FullFileName") End If If TypeOf oOccurrence Is ComponentOccurrenceProxy Then Prop = iProperties.Value(oDoc.NativeObject.Name, "Summary", "Title") Else Prop = iProperties.Value(oDoc.DisplayName, "Summary", "Title") End If If Prop = "Frame Generator" Then 'MessageBox.Show(Prop, "iProperty Value") '*** FIND THE FRAME GENERATOR ASSEMBLY PART NUMBER HERE *** End If End Sub
Solved! Go to Solution.