【求助】关于“外部应用程序附加模块需要名称节点”
本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />==========【以下是源程序代码】using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System.Windows.Media.Imaging;
using System.Reflection;
namespace HelloWorldPanel
{
/// <remarks>
/// This application's main class. The class must be Public.
/// </remarks>
public class Class1 : IExternalApplication
{
// Both OnStartup and OnShutdown must be implemented as public method
public Result OnStartup(UIControlledApplication application)
{
// Add a new ribbon panel
RibbonPanel ribbonPanel = application.CreateRibbonPanel("NewRibbonPanel");
// Create a push button to trigger a command add it to the ribbon panel.
string thisAssemblyPath = Assembly.GetExecutingAssembly().Location;
PushButtonData buttonData = new PushButtonData("cmdHelloWorld",
"Hello World", thisAssemblyPath, "Walkthrough.HelloWorld");
PushButton pushButton = ribbonPanel.AddItem(buttonData) as PushButton;
// Optionally, other properties may be assigned to the button
// a) tool-tip
pushButton.ToolTip = "Say hello to the entire world.";
// b) large bitmap
Uri uriImage = new Uri(@"D:\Sample\AddPanel\AddPanel\bin\Debug\AddPanel.png");
BitmapImage largeImage = new BitmapImage(uriImage);
pushButton.LargeImage = largeImage;
return Result.Succeeded;
}
public Result OnShutdown(UIControlledApplication application)
{
// nothing to clean up in this simple case
return Result.Succeeded;
}
}
/// <remarks>
/// The "HelloWorld" external command. The class must be Public.
/// </remarks>
public class HelloWorld : IExternalCommand
{
// The main Execute method (inherited from IExternalCommand) must be public
public Autodesk.Revit.UI.Result Execute(ExternalCommandData revit,
ref string message, ElementSet elements)
{
TaskDialog.Show("Revit", "Hello World");
return Autodesk.Revit.UI.Result.Succeeded;
}
}
}
===================【以下是addin文件】
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>D:\Sample\HelloWorldPanel\HelloWorldPanel\bin\Debug\HelloWorldPanel.dll</Assembly>
<AddInId>C615E05D-1159-43CA-A689-95DC3DA6017A</AddInId>
<FullClassName>HelloWorldPanel.Class1</FullClassName>
<Text>HelloWorldPanel</Text>
<VendorId>ASDK</VendorId>
<VendorDescription>ChengCai</VendorDescription>
</AddIn>
</RevitAddIns>
=================【问题】
求解决方案
www.890115.com 威尼斯人:wns185.com首存赠送58元亻足球亻真_人亻各类彩票齐全亻提现即时到账 本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />顶
www.890115.com 威尼斯人:wns185.com首存赠送58元Э足球Э真_人Э各类彩票齐全Э提现即时到账 本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />自己顶
www.138290.com SO娱乐城:真_人.足球.彩票齐全| 开户送10元.首存送58元.手机可投b注任何游戏顶级信用b提现即时到账SO.CC 本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />缺少 tag: Name<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Name>StartAPP</Name>
<Assembly>D:\Sample\HelloWorldPanel\HelloWorldPanel\bin\Debug\HelloWorldPanel.dll</Assembly>
<AddInId>C615E05D-1159-43CA-A689-95DC3DA6017A</AddInId>
<FullClassName>HelloWorldPanel.Class1</FullClassName>
<Text>HelloWorldPanel</Text>
<VendorId>ASDK</VendorId>
<VendorDescription>ChengCai</VendorDescription>
</AddIn>
</RevitAddIns>
www.138400.cc 本站强荐:185娱乐~城.足球~真_人.彩票齐全~手机可投~注任何游戏. 首次开户送10元.首存送58元.信誉绝对保证185.cc 不错哦! 很好!! 赞!! 感谢分享
页:
[1]