EaBIM一直以来积极响应国家“十二五”推进建筑业信息化的号召,对建筑领域的信息技术开展深入技术交流和探讨!致力于打造“BIM-建筑师-生态技术”三位一体综合资源交流共享平台,希望为BIM与可持续设计理念及技术的普及做出微小的贡献!!!

Aestheticism 发表于 2015-7-29 18:18:27

【求助】关于“外部应用程序附加模块需要名称节点”

本帖最后由 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元亻足球亻真_人亻各类彩票齐全亻提现即时到账

苦行僧1 发表于 2015-7-30 08:49:43

本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />顶

www.890115.com 威尼斯人:wns185.com首存赠送58元Э足球Э真_人Э各类彩票齐全Э提现即时到账

Aestheticism 发表于 2015-7-30 10:24:48

本帖最后由 Aaronyee 于 2015-11-2 19:21 编辑 <br /><br />自己顶

www.138290.com SO娱乐城:真_人.足球.彩票齐全| 开户送10元.首存送58元.手机可投b注任何游戏顶级信用b提现即时到账SO.CC

Jock 发表于 2015-8-5 16:58:58

本帖最后由 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

EaBIM门户编辑 发表于 2015-8-7 09:44:39

不错哦!

EaBIM门户编辑 发表于 2015-8-10 10:11:32

很好!!

EaBIM门户编辑 发表于 2015-8-12 10:01:06

赞!!

萧闫子 发表于 2015-8-16 12:01:42

感谢分享
页: [1]
查看完整版本: 【求助】关于“外部应用程序附加模块需要名称节点”