11-26-2024
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-26-2024
02:33 AM
With this modification the _myVariableObject is apparently Not Nothing... I got a messagebox showing the MyVariable-value.
Does this mean that the problem must be found on the iLogic or Inventor side?
StandardAddInServer.vb:
Option Strict On
Option Explicit On
Imports System.Runtime.InteropServices
Imports Inventor
Imports System.Windows.Forms
<GuidAttribute("bec4b251-a925-4ac7-828b-0bd050b2b6de"), ComVisible(True)>
Public Class StandardAddInServer
Implements Inventor.ApplicationAddInServer
Public Sub Activate(AddInSiteObject As ApplicationAddInSite, FirstTime As Boolean) Implements ApplicationAddInServer.Activate
MessageBox.Show("Started")
_myVariableObject = New MyVariableObject With {
.MyVariable = "Test"
}
MessageBox.Show("Succeeded?")
End Sub
Public ReadOnly Property Automation As Object Implements ApplicationAddInServer.Automation
Get
If Not (_myVariableObject Is Nothing) Then
MsgBox(_myVariableObject.MyVariable)
Else
MsgBox("Apparently the object remains Nothing...")
End If
Return _myVariableObject
End Get
End Property
End Class
Public Class MyVariableObject
Public Property MyVariable As String
End Class
René van der Starre