Quantcast
Viewing all articles
Browse latest Browse all 14319

.NET Datepicker control throws e0434352h error when loaded in Autocad

I'm working on a VB.NET library for Autocad and I must show a dialog with a datepicker on it. It shows the window fine, but if I try to change the selected date it throws this error:

    FATAL ERROR: Unhandled e0434352h Exception at fd3b9e5dh

and obviously it exits. I've created a simple mock project to isolate the problem, here is the whole code:

Window1.xaml

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300"><Grid><DatePicker
            HorizontalAlignment="Left"
            VerticalAlignment="Top"/></Grid></Window>

 
Window1.xaml.vb

Imports Autodesk.AutoCAD.Runtime

Public Class Window1
End Class

Public Class init
    Implements IExtensionApplication

    Public Sub Initialize() Implements IExtensionApplication.Initialize
        'This Code runs when the library is loaded in autocad
        '(through netload command for eg)
        Dim MainWindow = New Window1
        MainWindow.Show()
    End Sub

    Public Sub Terminate() Implements IExtensionApplication.Terminate
    End Sub

End Class

 
What is the most curious thing about this is that if I run autocad from Visual Studio, by clicking Start and then I load my library from this instance of Autocad, it works as expected and I can change the date, but it takes a lot more time for Autocad to load itself.

What does Visual Studio do to acad.exe that it makes it work as intended with Datepicker control?

I suppose it loads some additional libraries. Datepicker is part of PresentationFramework.dll and I tried to load it manually from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\PresentationFramework.dll , but it didn't help.

Or how can I debug such an error? What does e0434352h and fd3b9e5dh mean?

On every autodesk forum it says that this is a .NET related problem, and you should reinstall Autocad and .NET, but I already know this is a .NET problem, because I'm causing it from .NET. This solution obviously work for others, because a clean install would get read of crappy custom library, like the one above, but I want it to work.

In my original project I've already tried to bind the control to some datetime properties from my viewmodel, but to no help.

Windows 7 x64
Autocad Map 3d 64bit
Visual Studio 2012

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 14319

Trending Articles