字典中可以再存放字典(嵌套存放),也可以存一个扩展记录,类名:MxDrawXRecord,详细参考:​​http://www.mxdraw.com/help/IMxDrawXRecord.htm​​,

下面代码,演示了,使用递归方式,如果去遍历字典中所有数据,js如下:

function GetAllDictionaryDataCall(dict) {
// 创建一个字典遍历器
var iter = dict.NewIterator();
var sOut = "";
for (; !iter.Done(); iter.Step())
{
// 遍历到每个字典,取出名称.
var sName = iter.Name();
sOut = sOut + "," + sName;
var obj = iter.GetObject();
if (obj == null)
continue;
if (obj.ObjectName == "McDbDictionary")
{
var tmpDict = obj;
sOut += "," + GetAllDictionaryDataCall(tmpDict);
}
}
return sOut;

}

执行

    // 得到数据库对象.    
var database = mxOcx.GetDatabase();
// 得到全局字典
var dict = database.GetNamedObjectsDictionary();
var sOut = GetAllDictionaryDataCall(dict);

alert(sOut);