I'm really hoping someone has an idea of what I'm doing wrong here.
I'm reading a template for it's PlotSetttings, to display the properties of any of these PlotSettings in a WindowsForm. The reading of the dictionary value works fine. I can retrieve each PlotSetting's name, but opening that dictionary value to read causes the eDwgObjectImproperlyRead error. Here is the pertinent code that I'm working with:
using (Transaction acTrans = db.TransactionManager.StartTransaction())
{
DBDictionary plSettings = acTrans.GetObject(db.PlotSettingsDictionaryId,
OpenMode.ForRead) as DBDictionary;
if (plSettings != null)
{
ListViewItem row;
// List each named page setup
foreach (DBDictionaryEntry item in plSettings)
{
plotSetting = item.Key;
PlotSettings settings = null;
settings = acTrans.GetObject(item.Value, OpenMode.ForRead) as PlotSettings;
This last GetObject() call causes the error... I've hunted all over for all samples I could find that do anything similar, and this is basically the same as those samples. Of course, I don't know for certain that ANY of those sample actually work.
Any ideas?