I'm writing an add-in for Autodesk Inventor in Visual Studio using VB.net. There are many different types of documents. When I know the type of document, I want IntelliSense to list the members of that document. Is there any way to do that without Dim-ing a completely new variable?
Sub Test(o_Doc As Inventor.Document)
Select Case True
Case TypeOf o_Doc Is AssemblyDocument, TypeOf o_Doc Is PartDocument
o_Doc. ' Intellisense lists the members for Inventor.Document
End Select
End Sub
After typing o_Doc, I press period and it lists the members of Inventor.Document. The AssemblyDocument and PartDocument both share a ComponentDefinition member, but not every type of document does. Is there a way to list all the members for the AssemblyDocument without having to insert this after the Case operator?
Dim _AssemblyDocument as Inventor.AssemblyDocument= o_Doc
_AssemblyDocument. ' lists all the members of AssemblyDocument
Edit: Changed the Dim _AssemblyDocument as Inventor.Document to AssemblyDocument