Plugin doesn't show in Revit add ins manager !!!

Plugin doesn't show in Revit add ins manager !!!

nia98bim
Enthusiast Enthusiast
391 Views
1 Reply
Message 1 of 2

Plugin doesn't show in Revit add ins manager !!!

nia98bim
Enthusiast
Enthusiast

hey, I trying to create my first plugin based on Autodesk sample,

 

all of the activity was done but when the code is run and Revit is open up , my plugin doesn't show in addin manager,

 

I also attached my files in attachment.

 

 

 

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 Autodesk.Revit.Attributes;
using System.Xml.Linq;

namespace MyRevitCommands
{
    [TransactionAttribute(TransactionMode.ReadOnly)]
    public class GetElementId : IExternalCommand
    {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            //Get UIDocument
            UIDocument uidoc = commandData.Application.ActiveUIDocument;

            try 
            {
                //Pick Object
                Reference pickedObj = uidoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element);

                //Display Element Id
                if (pickedObj != null)
                {
                    TaskDialog.Show("Element Id", pickedObj.ElementId.ToString());
                }

                return Result.Succeeded;
            }
            catch (Exception e)
            {
                message = e.Message;
                return Result.Failed;
            }

        }
    }
}

 

 

 

 

 

 

elementid.addin file

 

 

 

 

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<RevitAddIns>
	<AddIn Type="Command">
		<Assembly>id.dll</Assembly>
		<AddInId>309C539E-DE97-4DCA-AA15-7F1F93C4159A</AddInId>
		<FullClassName>id.elementid</FullClassName>
		<Text>ElementID</Text>
		<VendorId>Sajjad</VendorId>
	</AddIn>
</RevitAddIns>

 

 

 

 

after that I add macro for direction 

 

Copy "$(TargetDir)"."" "$(AppData)\Autodesk\Revit\Addins\2023\"

 

 

 

I really appreciated to know your idea about this problem.

0 Likes
392 Views
1 Reply
Reply (1)
Message 2 of 2

Moustafa_K
Collaborator
Collaborator

on a quick look over the posted code (didn't yet look over the attached) you have a problem in the fullclassname property inside the addin file. As the name says, a full class name, this means the namespace + class name of the command

in this case it would be 

<FullClassName>MyRevitCommands.GetElementId</FullClassName>

 

you need to ensure the dll name matches what you mentioned in the addin file... it has to be the full path, or the addin and the dll are in the same folder.... 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1