Announcement

Collapse
No announcement yet.

Simple Test App Help 2014

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Simple Test App Help 2014

    I'm struggling to get anything up and running on 2014 even using the Add-In Wizards for Revit 2014.

    I've stripped the code back to basics now just trying to get a simple message box to show something is preventing the app even getting to this point and it's doing my head in!!!

    Hoping someone here can spot it probably something so simple...

    App.cs

    Code:
    #region Namespaces
    using System;
    using System.Collections.Generic;
    using Autodesk.Revit.ApplicationServices;
    using Autodesk.Revit.Attributes;
    using Autodesk.Revit.DB;
    using Autodesk.Revit.UI;
    using System.Windows.Forms;
    
    #endregion
    
    namespace Test
    {
        class App : IExternalApplication
        {
            public Result OnStartup(UIControlledApplication a)
            {
                MessageBox.Show("Test OnStartup");
    
                return Result.Succeeded;
            }
    
            public Result OnShutdown(UIControlledApplication a)
            {
                MessageBox.Show("Test OnShutdown");
    
                return Result.Succeeded;
            }
    
    
        }
    }
    Test.addin

    Code:
     <?xml version="1.0" encoding="utf-8"?>
      <AddIn Type="Application">
        <Name>Test Application</Name>
        <Assembly>Test.dll"</Assembly>
        <FullClassName>Test.App</FullClassName>
        <ClientId>22e20807-aff6-4ed8-8503-a7f4f3b20ed6</ClientId>
        <VendorId>Test</VendorId>
        <VendorDescription>Test</VendorDescription>
      </AddIn>
    Both the dll & addin file are being copied to C:\ProgramData\Autodesk\Revit\Addins\2014 post build...

    There are no errors or warnings...

    Any ideas?

    Code is attached appreciate any help.

    Thanks,


    Nathan
    Attached Files

    #2
    Try replacing MessageBox.Show() with DialogBox.Show(...).
    That way you will know if the problem is in the forms.
    Gonçalo Feio
    "Ignorance, ignorance, sheer ignorance - you know there's no confidence to equal it. It's only when you know something about a profession, I think, that you're timid and careful." George Orson Welles

    Comment


      #3
      In Test.addin file:
      Maybe the extra quote in <Assembly>Test.dll"</Assembly>
      Or:
      Instead of:
      <Assembly>Test.dll"</Assembly>
      I would try:
      <Assembly>./Test.dll</Assembly>
      or
      <Assembly>C:\ProgramData\Autodesk\Revit\Addins\201 4\Test.dll</Assembly>

      Comment


        #4
        Thanks tried these no luck not sure why. I tried using this wizard and it it amazing and works perfectly Revit Addin Wizards/Coders and Revit API Widgets - RevitNetAddinWizard & NavisworksNetAddinWizard

        Comment


          #5
          Your ADDIN file needs to include <RevitAddIns>

          For example:
          <?xml version="1.0" encoding="utf-8"?>
          <RevitAddIns>
          <AddIn Type="Application">
          <Name>Boost Your BIM OmniFormat</Name>
          <Assembly>.\BoostYourBIM-OmniFormat\UniformatSearch.dll</Assembly>
          <AddInId>11a81a20-ed49-4341-aa1a-176782313b92</AddInId>
          <FullClassName>UniformatSearch.button</FullClassName>
          <VendorId>BYBM</VendorId>
          </AddIn>
          </RevitAddIns>

          Comment


            #6
            Far out that would be it thankyou HarryMattison I will never get those hrs back but at least I now know not to delete those lines

            Originally posted by HarryMattison View Post
            Your ADDIN file needs to include <RevitAddIns>

            For example:
            <?xml version="1.0" encoding="utf-8"?>
            <RevitAddIns>
            <AddIn Type="Application">
            <Name>Boost Your BIM OmniFormat</Name>
            <Assembly>.\BoostYourBIM-OmniFormat\UniformatSearch.dll</Assembly>
            <AddInId>11a81a20-ed49-4341-aa1a-176782313b92</AddInId>
            <FullClassName>UniformatSearch.button</FullClassName>
            <VendorId>BYBM</VendorId>
            </AddIn>
            </RevitAddIns>

            Comment

            Related Topics

            Collapse

            Working...
            X