07-02-2018
02:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-02-2018
02:04 AM
Here's a usage example from an addin written by myself & @MrSmithtastic:
Private Sub m_UserInputEvents_OnActivateCommand(CommandName As String, Context As NameValueMap)
If Not AddinGlobal.InventorApp.ActiveDocument Is Nothing Then
If (AddinGlobal.InventorApp.ActiveDocument.DocumentType = DocumentTypeEnum.kDrawingDocumentObject) Then
If CommandName = "VaultCheckinTop" Or CommandName = "VaultCheckin" Then
DocumentToPulliPropValuesFrom = AddinGlobal.InventorApp.ActiveDocument
If iProperties.GetorSetStandardiProperty(AddinGlobal.InventorApp.ActiveDocument, PropertiesForDesignTrackingPropertiesEnum.kDrawingDeferUpdateDesignTrackingProperties, "", "") = False Then
WhatToDo = MsgBox("Updates are not Deferred, do you want to Defer them?", vbYesNo, "Deferred Checker")
If WhatToDo = vbYes Then
AddinGlobal.InventorApp.ActiveDocument.DrawingSettings.DeferUpdates = True
myiPropsForm.Label8.ForeColor = Drawing.Color.Red
myiPropsForm.Label8.Text = "Drawing Updates Deferred"
UpdateStatusBar("Updates are now Deferred")
MsgBox("Updates are now Deferred, continue Checkin", vbOKOnly, "Deferred Checker")
Else
'Do Nothing
End If
End If
End If
End If
End If
End Sub^ doesn't deal with setting up the Events listener or anything, but if you want to dig into it a little deeper, then the repo is here:
https://github.com/AlexFielder/MyFirstInventorAddin
----------------------------------------------------------------
Alex Fielder
Inventor Expert
https://github.com/alexfielder/
LinkedIn - Github Inventor Extension Server - Bonkers polygon iLogic thing
Top ten iLogic Tips - API Shortcut In Google Chrome - Assembly Extrusion Example
Alex Fielder
Inventor Expert
https://github.com/alexfielder/
LinkedIn - Github Inventor Extension Server - Bonkers polygon iLogic thing
Top ten iLogic Tips - API Shortcut In Google Chrome - Assembly Extrusion Example