自定义菜单 缺少dll去哪儿找.
带式菜单使用菜单需要加入如下引用: AcDbMgd, AcMgd, AdWindows, PresentationCore, PresentationFramework , WindowsBase (PresentationCore, PresentationFramework , WindowsBase)我的系统是vs2005+cad2010 这3个去哪儿找,我找了半天 也没有找到,如何解决.
using System; using Autodesk.Windows; using Autodesk.AutoCAD.Runtime; namespace Sample { class Ribbon { public void AddRibbon() { RibbonControl rc = RibbonControl(); RibbonTab rt = RibbonTab("菜单标签", "1"); RibbonPanel rp = RibbonPanel("菜单面板"); RibbonButton rb = RibbonButton("菜单按钮", "菜单命令"); rp.Source.Items.Add(rb); rt.Panels.Add(rp); rc.Tabs.Add(rt); } /// <summary> /// 获得菜单控制 /// </summary> /// <returns></returns> public static RibbonControl RibbonControl() { if (Autodesk.Windows.ComponentManager.Ribbon == null) Autodesk.Windows.ComponentManager.ItemInitialized += new EventHandler<RibbonItemEventArgs>(ComponentManager_ItemInitialized); return ComponentManager.Ribbon; } /// <summary>
...............
AdWindows.dll在cad2010的安装目录下
PresentationCore, PresentationFramework 在.Net3.0下
2010最好对应VS2008
把这些都添加上去,最后运行时,cad直接出现错误。
页:
[1]