Tim;
I know that later, the ones that really know, will guide better, but on the mean time, let me post a little simple class I wrote for one of my routines, it might help, I do not know...

public partial class Door : DoorsAndWindowsForm
{
// Declarations
private ObjectId m_blockid = new ObjectId();
private const Int32 m_vertices = 4;
private String m_doorName = "";
private Double m_doorThick = 1.75; //1-3/4"
private Double m_doorWidth = 0.0;
private Double m_wallThick = 0.0;
private Double m_dirRight = 0.0;
private Double m_dirUp = 0.0;
private Double m_dirLeft = 0.0;
private Double m_swingStartAngle = 0.0;
private Double m_swingEndAngle = 0.0;
public enum Names
{
dr90,
dr45,
dr30,
dr15,
dr180,
drPair90,
drPair90egress,
drSliding,
drPocket,
drFolding,
Rolling
};
// Default Constructor
public Door()
{
}
// Alternate constructor
public Door(Double doorWidth, Double wallThick, int drValue)
{
drWidth = doorWidth;
getDoorName(drValue);
Database db = HostApplicationServices.WorkingDatabase;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
...
Entity[] ent = new Entity[entities.Count];
entities.CopyTo(ent, 0);
ObjectId blockid = makeBlock("*U", ent);
DoorId = blockid;
// remove originals
en1.Erase(true);
en2.Erase(true);
en3.Erase(true);
en4.Erase(true);
tr.Commit();
}
}
// Properties
public Double SwingStartAngle
{
get
{
return m_swingStartAngle;
}
set
{
m_swingStartAngle = value;
}
}
public Double SwingEndAngle
{
get
{
return m_swingEndAngle;
}
set
{
m_swingEndAngle = value;
}
}
public ObjectId DoorId
{
get
{
return m_blockid;
}
set
{
m_blockid = value;
}
}
public Double DirRight
{
get
{
return m_dirRight;
}
set
{
m_dirRight = value;
}
}
public Double DirUp
{
get
{
return m_dirUp;
}
set
{
m_dirUp = value;
}
}
public Double DirLeft
{
get
{
return m_dirLeft;
}
set
{
m_dirLeft = value;
}
}
public Double Thick
{
get
{
return m_doorThick;
}
set
{
m_doorThick = value;
}
}
public Double drWidth
{
get
{
return m_doorWidth;
}
set
{
m_doorWidth = value;
}
}
public Double WallThick
{
get
{
return m_wallThick;
}
set
{
m_wallThick = value;
}
}
public String drName
{
get
{
return m_doorName;
}
set
{
m_doorName = value;
}
}
public String getDoorName(int valor)
{
string block_dwg = "90 degrees swing"; //default
switch (valor)
{
case 0:
SwingStartAngle = 0.0;
SwingEndAngle = c90Degrees;
DirRight = 0.0;
DirUp = c90Degrees;
DirLeft = Math.PI;
drName = "90 degrees swing";
block_dwg = "90 degrees swing";
break;
case 1:
SwingStartAngle = 0.0;
SwingEndAngle = 0.785398;
DirRight = c315Degrees;
DirUp = c45Degrees;
DirLeft = c135Degrees;
drName = "45 degrees swing";
block_dwg = "45 degrees swing";
break;
case 2:
SwingStartAngle = 0.0;
SwingEndAngle = 0.523599;
DirRight = 5.23599;
DirUp = 0.523599;
DirLeft = 2.0944;
drName = "30 degrees swing";
block_dwg = "30 degrees swing";
break;
case 3:
SwingStartAngle = 0.0;
SwingEndAngle = 0.261799;
DirRight = 4.97419;
DirUp = 0.2618;
DirLeft = 1.8326;
drName = "15 degrees swing";
block_dwg = "15 degrees swing";
break;
case 4:
SwingStartAngle = 0.0;
SwingEndAngle = Math.PI;
DirRight = c90Degrees;
DirUp = Math.PI;
DirLeft = c270Degrees;
drName = "180 degrees swing";
block_dwg = "180 degrees swing";
break;
case 5: // ignore this door - remove from here
block_dwg = "Pair 90 degrees swing";
break;
case 6: // ignore this door - remove from here
block_dwg = "Pair 90 degrees double egress";
break;
case 7:
block_dwg = "Sliding";
break;
case 8:
block_dwg = "Pocket";
break;
case 9:
block_dwg = "Folding";
break;
case 10:
block_dwg = "Rolling";
break;
}
return block_dwg;
}
}//end of Door class
Then, when I need to change/update one of the doors I just read all the data in the dictionaries and call it like:
Door door = new Door(dw, wwidth, doorNamesIndex);
Point2d pgeo = new Point2d(x, y);
// save values to door!!!
door.drName = dname;
door.WallThick = wwidth;
door.drWidth = dw;
Super Mickey Mouse.... I know..