明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1920|回复: 7

WPF开发CAD的问题

[复制链接]
发表于 2011-6-30 17:20 | 显示全部楼层 |阅读模式
用WPF开发AutoCAD.NET 程序的三种用法(学习笔记)
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=84848&fromuid=365479

我下载了该例子中的入门范例,在VS08的环境中无任何问题,但是直接在CAD中netload加载dll出现的错误提示,期待高人解决

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2011-6-30 17:34 | 显示全部楼层
不详细啊,详细信息
 楼主| 发表于 2011-6-30 17:37 | 显示全部楼层
      就是代码在VS环境下运行很正常,但是直接用cad加载dll就出现那个错误了
 楼主| 发表于 2011-6-30 17:38 | 显示全部楼层
   我怀疑CAD2008不支持WPF
发表于 2011-6-30 21:14 | 显示全部楼层
很明显是运行时错误,你可以看看详细信息中的提示,一般会说明是哪一行的,你就在前面查看一下
 楼主| 发表于 2011-7-1 09:27 | 显示全部楼层
本帖最后由 lxf0802 于 2011-7-1 09:31 编辑

看不出行号,因为不是调试状态,调试状态下是没有这个问题的。直接cad加载dll出现的错误,错误的详细信息如下:

应用程序不支持实时(JIT)调试。
有关详细信息,请参见此消息的结尾。

************** 异常文本 **************
System.InvalidOperationException: 由于其他线程拥有此对象,因此调用线程无法对其进行访问。
   在 System.Windows.Threading.Dispatcher.VerifyAccess()
   在 System.Windows.Threading.DispatcherObject.VerifyAccess()
   在 MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   在 MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
   在 System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
   在 System.Windows.UIElement.GetUIParentWithinLayoutIsland()
   在 System.Windows.ContextLayoutManager.LayoutQueue.Add(UIElement e)
   在 System.Windows.UIElement.InvalidateArrange()
   在 System.Windows.UIElement.InvalidateVisual()
   在 System.Windows.Forms.Integration.ElementHost.OnPaintBackground(PaintEventArgs pevent)
   在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   在 System.Windows.Forms.Control.WmPaint(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
 楼主| 发表于 2011-7-1 16:33 | 显示全部楼层
     问题已经解决,换了cad2010就没有问题,看来cad2008还是不能完全支持wpf
发表于 2011-7-5 08:55 | 显示全部楼层
cad2008确实不支持WPF,不过调试状态居然能正常运行,还是出乎意料。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-19 01:43 , Processed in 0.223678 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表