Ribbon creation in revit 2014

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
These are the code lines in vb c#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Windows.Media.Imaging;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System.Xaml;
using Autodesk.Revit.Creation;
using Autodesk.Revit.UI.Events;
namespace Ribbon
{
[Regeneration(RegenerationOption.Manual)]
class CsAddPanel : Autodesk.Revit.UI.IExternalApplication
{
public Result OnStartup(UIControlledApplication application)
{
String tabName = "This Tab Name";
application.CreateRibbonTab(tabName);
//create two push buttons
PushButtonData button1 = new PushButtonData("Button1", "My Button #1",
@"C:\All Elements.dll", "All_Elements.AllElements");
PushButtonData button2 = new PushButtonData("Button2", "My Button #2",
@"C:\MaterialQuantities.dll", "MaterialQuantities.Command");
RibbonPanel m_projectPanel = application.CreateRibbonPanel(tabName,"This Panel Name");
List<RibbonItem> projectButtons = new List<RibbonItem>();
projectButtons.AddRange(m_projectPanel.AddStackedItems(button1, button2));
return Result.Succeeded;
}
public Result OnShutdown(UIControlledApplication application)
{
return Result.Succeeded;
}
}
}
this is the adding manifest file
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<!-- 1_Ribbon -->
<AddIn Type="Application">
<Name>UI Labs Ribbon</Name>
<FullClassName>Ribbon2.AddPanel</FullClassName>
<Assembly>C:\Users\Autodesk\Documents\Visual Studio 2010\Projects\Ribbon2\Ribbon2\bin\Debug\Ribbon2.dll</Assembly>
<AddInId>7851F984-76C1-437E-BF66-645FEE13A873</AddInId>
<VendorId>ADNP</VendorId>
<VendorDescription>Autodesk, Inc. www.autodesk.com</VendorDescription>
</AddIn>
there r no errors..
its showing two warnings...
Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "RevitAPI", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Warning 2 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "RevitAPIUI", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Ribon doesn't get executed...
What is my mistake n how to rectify it?
Please help me...