I'm creating a AddIn application for Autodesk Inventor. This AddIn has the purpose to have some designtools that will increase the productivity.
(This tool in particular will perform a copy design but that just for info.)
I have written the tool in a standalone application and it worked, then I added into the Autodesk Inventor AddIn and it didn't work anymore.
So I searched around a bit and I found that I should keep the standalone application and call it from the AddIn.
This would be the call from my AddIn
I'm doing it like this I think, there are a bunch of methods on the msdn page but, I guess this is what I need
' url's are not considered documents. They can only be opened
' by passing them as arguments.
' Start a Web page using a browser associated with .html and .asp files.
End Sub 'OpenWithArguments
You actually have two options (that I know of) :
Use the Main method with argument.
Somewhere in you code there is your main method, i.e. the first method that will be called when your application starts. It should look like this :
Sub Main() ... End Sub
You can actually decide that this method should receive arguments :
Sub Main(ByVal cmdArgs() As String) For Each Arg As String in cmdArgs 'Do some stuff with this Arg Debug.Writeline("Argument : " & Arg) Next For End Sub
Use the CommanLine property of Environment
Sub Main() Dim arguments As String() = Environment.GetCommandLineArgs() For Each Arg As String in arguments 'Do some stuff with this Arg Debug.Writeline("Argument : " & Arg) Next For End Sub