Hi All,
I'm trying to use this example about invoking a Contextual Ribbon Tab:
http://adn.autodesk.com/adn/servlet/devnote?siteID=4814862&id=13732140&linkID=4900509
and looking for information about using the Selection class in Autodesk.AutoCAD.Windows.Data, but I can't find any documentation anywhere.
The example contains this simple assembly:
using System;
using Autodesk.AutoCAD.Windows.Data;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
namespace Aen1Helper
{
public class Functions
{
public static bool ShowMyTab(object selObj)
{
Selection sel = (Selection)selObj;
if (sel.Count < 1 || !sel.ContainsOnly(new string[] { "Line" }))
return false;
if (Application.DocumentManager.MdiActiveDocument.
Name.EndsWith("Drawing1.dwg"))
return true;
return false;
}
}
}
Where it mentions "Line" I want to replace with a reference to our own type of AutoCAD object, but it ain't working so am trying to find out how the Selection class works so I can analyse the selected objects characteristics, etc.
If anybody can point me to documentation for Autodesk.AutoCAD.Windows.Data classes I would be most grateful. Many thanks for your time and attention.
Regards,
Andrew