Community
Hi There,
I'm trying to use an iLogic rule to display a custom parameter from the selected component. If I put the parameter in iproperties it works just fine, but not with parameters.
Thanks for any help.
Here is the code:
SyntaxEditor Code Snippet
Dim oOccurrence As ComponentOccurrence Dim PortProp As String Dim PortNum as Double Dim PropLen As Double Try oOccurrence = ThisDoc.Document.SelectSet.Item(1) Catch MessageBox.Show("Please select a component before running this rule.", "iLogic") Return End Try Try If TypeOf oOccurrence Is ComponentOccurrenceProxy Then PortProp = Parameter.Value(oOccurrence.NativeObject.Name, "PortSize") Else PortProp = Parameter.Value(oOccurrence.NativeObject.Name, "PortSize") End If Catch MessageBox.Show("Error", "TKSY") Return End Try MessageBox.Show(PortProp, "TKSY")
Solved! Go to Solution.
Solved by DRLTKSE. Go to Solution.
Solved:
SyntaxEditor Code Snippet
Try If TypeOf oOccurrence Is ComponentOccurrenceProxy Then PortProp = Parameter(oOccurrence.NativeObject.Name, "PortSize") Else PortProp = Parameter(oOccurrence.Name, "PortSize") End If Catch MessageBox.Show("Sort Your Fish Out Mate!", "TKSY") Return End Try MessageBox.Show(PortProp, "TKSY")