Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
Is there a way to assign the initial variable used to create a class as an object? Similar to how you have a ComponentOccurrence object, that has further parameters. It might be easier to explain with code:
Sub Main Dim oAsm As AssemblyDocument = ThisDoc.Document Part.oApp = ThisApplication Dim Part_1 As New Part Dim Part_2 As New Part If Part_1 Is Part_2 Then MsgBox("Parts are the same!") End Sub Class Part Public Shared oApp As Inventor.Application Frame = oApp.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "SELECT PART 1") Public Property Name As String = Frame.Name End Class
This doesn't work of course, but It would be nice to have the base item represent an object. I don't think this is possible but It would be very nice.
The same way the base of a ComponentOccurrence is an object, can a class be the same or do I need to set a variable representing the Component.
Solved! Go to Solution.