博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用VB.net Express 2010开发AutoCAD.net插件调试时出现很多错误的解决办法
阅读量:6268 次
发布时间:2019-06-22

本文共 5291 字,大约阅读时间需要 17 分钟。

如果你对编程和开发AutoCAD.net 插件还是新手,那么最近发布的“”系列课程绝对值得一看。这个课程面向编程零基础但想对AutoCAD进行扩展的童鞋们。你可以使用免费的Visual Studio Express版本来开发。 AutoCAD开发者中心还提供了项目向导,帮助你来快速的创建一个AutoCAD.net插件,并且这个向导还能帮你做好在Visual Studio Express版本中启动AutoCAD进行调试的相关设置,而这在Visual Studio Express的界面中的没有的。

 

如果你使用VB.net Express 2010 并利用创建了一个AutoCAD.net 插件,按F5启动调试时,在”即时”窗口中可能会发现很多错误。这些错误并不影响你程序的运行,但你往往需要等待好长时间才能开发调试工作。

相关的错误信息类似:

'----Immediate Window--------------------------------------

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='ToolBarCustomizeButton' (HashCode=44123454); target element is 'ToolBarToggleButton' (Name='mCustomizeButton'); target property is 'Name' (type 'String')

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='ToolBarCustomizeButton' (HashCode=44123454); target element is 'ToolBarToggleButton' (Name='mCustomizeButton'); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='ToolBarCustomizeButton' (HashCode=44123454); target element is 'RibbonItemControl' (Name=''); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='InfoCenterTextBox' (HashCode=52380055); target element is 'RibbonItemControl' (Name=''); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='InfoCenterTextBox' (HashCode=52380055); target element is 'Button' (Name='PART_AcceptButton'); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='WebServicesLoginButton' (HashCode=720995); target element is 'LoginButtonRibbonItemControl' (Name='mContainer'); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='RibbonToggleButton' (HashCode=43678569); target element is 'RibbonItemControl' (Name=''); target property is 'Name' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=AutomationName; DataItem='WebServicesLoginButton' (HashCode=720995); target element is 'WebservicesLoginButtonControl' (Name='mDropDownButton'); target property is 'Name' (type 'String')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Autodesk.Private.Windows.ToolBars.ToolBarControl', AncestorLevel='1''. BindingExpression:Path=IsVisible; DataItem=null; target element is 'ImageControl' (Name='mImage'); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Autodesk.Private.Windows.ToolBars.ToolBarControl', AncestorLevel='1''. BindingExpression:Path=IsVisible; DataItem=null; target element is 'ImageControl' (Name='mImage'); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Autodesk.Private.Windows.ToolBars.ToolBarControl', AncestorLevel='1''. BindingExpression:Path=IsVisible; DataItem=null; target element is 'ImageControl' (Name='mImage'); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Autodesk.Private.Windows.ToolBars.ToolBarControl', AncestorLevel='1''. BindingExpression:Path=IsVisible; DataItem=null; target element is 'ImageControl' (Name='mImage'); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Autodesk.Private.Windows.ToolBars.ToolBarControl', AncestorLevel='1''.

 

解决的办法就是添加下面的 <system.diagnostics>节到 Acad.exe.Config中,这个文件可以在你的AutoCAD安装目录中找到:

添加完成后,类似下面的样子(这里我使用的是Civil 3D):

希望对你有帮助。

转载地址:http://utppa.baihongyu.com/

你可能感兴趣的文章
linux 查看当前路径命令:pwd
查看>>
At.js – 用于 Web 应用程序的自动完成库
查看>>
[Android Pro] Android权限设置android.permission完整列表
查看>>
如何对抗硬件断点--- 调试寄存器
查看>>
mybatis学习
查看>>
从不同层面看cocos2d-x
查看>>
Struts2技术详解
查看>>
MFC应用程序向导生成的文件
查看>>
Oracle体系结构之oracle密码文件管理
查看>>
【leetcode】Remove Element (easy)
查看>>
mysql多表查询及其 group by 组内排序
查看>>
alsa的snd_pcm_readi()函数和snd_pcm_writei()
查看>>
Android学习网站推荐(转)
查看>>
嵌入式根文件系统的移植和制作详解
查看>>
MEF部件的生命周期(PartCreationPolicy)
查看>>
LCD的接口类型详解
查看>>
nginx 基础文档
查看>>
LintCode: Unique Characters
查看>>
Jackson序列化和反序列化Json数据完整示例
查看>>
.net 中的DllImport
查看>>