Message 1 of 5
Inventor 2026 WPF APP error/bug/exception
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
When running my add-in with inventor 2026, I get an error when I save a document.
My addin is a dockable WPF window where you can edit iProperties.
I have a feeling it could be related to a mismatch in package versions. Error is thrown from inventor DLL's.
Exception info below:
System.Windows.Markup.XamlParseException
HResult=0x80131501
Message=Add value to collection of type 'Microsoft.Xaml.Behaviors.TriggerActionCollection' threw an exception.
Source=PresentationFramework
StackTrace:
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) in System.Windows.Markup\XamlReader.cs:line 401
at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri) in System.Windows.Markup\XamlReader.cs:line 396
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) in System.Windows\FrameworkTemplate.cs:line 780
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) in System.Windows\FrameworkTemplate.cs:line 687
at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren) in System.Windows\FrameworkTemplate.cs:line 517
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) in System.Windows\StyleHelper.cs:line 920
at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) in System.Windows\FrameworkTemplate.cs:line 494
at System.Windows.FrameworkElement.ApplyTemplate() in System.Windows\FrameworkElement.cs:line 1706
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3485
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in System.Windows.Controls\Grid.cs:line 1454
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in System.Windows.Controls\Grid.cs:line 1393
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 986
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 1051
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in System.Windows.Controls\Grid.cs:line 1454
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in System.Windows.Controls\Grid.cs:line 1393
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 1006
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) in MS.Internal\Helper.cs:line 320
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) in System.Windows.Documents\AdornerDecorator.cs:line 72
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Grid.MeasureOverride(Size constraint) in System.Windows.Controls\Grid.cs:line 1051
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint) in System.Windows.Controls\Border.cs:line 368
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3538
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Window.MeasureOverrideHelper(Size constraint) in System.Windows\Window.cs:line 2328
at System.Windows.Window.MeasureOverride(Size availableSize) in System.Windows\Window.cs:line 1743
at System.Windows.FrameworkElement.MeasureCore(Size availableSize) in System.Windows\FrameworkElement.cs:line 3488
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Window.SetRootVisualAndUpdateSTC() in System.Windows\Window.cs:line 2209
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight) in System.Windows\Window.cs:line 2194
at System.Windows.Window.CreateSourceWindow(Boolean duringShow) in System.Windows\Window.cs:line 2053
at System.Windows.Window.ShowHelper(Object booleanBox) in System.Windows\Window.cs:line 3427
at System.Windows.Window.Show() in System.Windows\Window.cs:line 1450
at System.Windows.Window.ShowDialog() in System.Windows\Window.cs:line 1549
at Autodesk.Inventor.Dialogs.FileDialog.FileDialogTerm.StartFileDialogModal(String messageName, BinaryReader inputs, BinaryWriter replies)
at Autodesk.Inventor.IPC.InputMessageChannel.SendMessage(Byte[] message)
at WHxMessageChannelNative.SendMessage(WHxMessageChannelNative* , RMxBinaryBuffer* inputs, RMxBinaryBuffer* outputs)
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
ArgumentException: Cannot add instance of type 'EventCommandExecuter' to a collection of type 'TriggerActionCollection'. Only items of type 'T' are allowed.
Contact me for custom app development [email protected]. Follow below links to view my Inventor appstore apps.
Free apps: Smart Leader | Part Visibility Utility | Mate Origins
Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro
Free apps: Smart Leader | Part Visibility Utility | Mate Origins
Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro