Sub main problem in addin

Sub main problem in addin

SandmanINV
Advocate Advocate
445 Views
1 Reply
Message 1 of 2

Sub main problem in addin

SandmanINV
Advocate
Advocate

Hi everyone, 

Follow inventor add intemplate. I have a subnew in form1 class like this

Public Sub New(ByVal oApp As Inventor.Application)
InitializeComponent()
oinv = oApp
' ' Add any initialization after the InitializeComponent() call.
End Sub

In Addinseverfile. I call form1

 Dim oform1 As New Form1()

But I have error.

Severity Code Description Project Path File Line Suppression State
Error BC30455 Argument not specified for parameter 'oApp' of 'Public Sub New(oApp As Application)'.

 

What should i do now ?

Thank you.

0 Likes
Accepted solutions (1)
446 Views
1 Reply
Reply (1)
Message 2 of 2

HideoYamada
Advisor
Advisor
Accepted solution

Hi,

 

I'm not so good at VB.net, but I think that you will have to ...

Dim oform1 As New Form1(g_inventorApplication)

 

=====

Freeradical

 Hideo Yamada

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes