ok you confused me. I want to do the same thing when I user selects a door
that is in a reference. Not all doors are going to be extracted just one
door the user selects. Here is what I have for a current drawing:
Here is what I have so far:
Dim ReturnObj As Object
Dim basePnt As Object
Dim Door As AecDoor
Dim dbWidth As Double
Dim dbHeight As Double
ThisDrawing.Utility.GetEntity(ReturnObj, basePnt, "Select the Door to Tag!")
Door = ReturnObj
dbWidth = Door.Width
dbHeight = Door.Height
wrote in message news:5098551@discussion.autodesk.com...
Hi Nate,
you have to use filters in my opinion. Try something like this.
public static ObjectId[] FetchAllDorrObjs()
{
Editor ed =
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
TypedValue[] typeArray = new TypedValue[1];
typeArray[0] = new TypedValue((int) DxfCode.ExtendedDataAsciiString,
"Door");
SelectionFilter sf = new SelectionFilter(typeArray);
PromptSelectionResult psr = ed.SelectAll(sf);
try
{
SelectionSet ss = psr.Value;
return ss.GetObjectIds();
}
catch (System.Exception)
{
return null;
}
}