- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@Anonymous
that would be helpfull.
Do you understand what i mean and what the problem is from my side?
this is the code you need to place in your add in:
Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
' Initialize AddIn members.
g_inventorApplication = addInSiteObject.Application
' Connect to the user-interface events to handle a ribbon reset.
m_uiEvents = g_inventorApplication.UserInterfaceManager.UserInterfaceEvents
appevent = g_inventorApplication.ApplicationEvents ' TODO: Add button definitions.
f = New Form1(g_inventorApplication)
Private Sub appevent_OnActivateDocument(DocumentObject As _Document, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles appevent.OnActivateDocument If BeforeOrAfter = EventTimingEnum.kAfter Then ) Try f.Show() f.Text = DocumentObject.DisplayName 'f.Refresh() Catch ex As Exception 'MsgBox("g") End Try End If End Sub Private Sub appevent_OnOpenDocument(DocumentObject As _Document, FullDocumentName As String, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles appevent.OnOpenDocument If BeforeOrAfter = EventTimingEnum.kAfter Then Try f.Show() f.Text = DocumentObject.DisplayName 'f.Refresh() Catch ex As Exception MsgBox("h") End Try End If End Sub
Regards,
Arthur Knoors
Autodesk Affiliations:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !