Message 1 of 2
Plugin doesn't show in Revit add ins manager !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.