************************************Edited ********************************
The Next Post I Think Has The Answer I Produced The Help File Value By Using The True Color Tab And Entering A Rgb Value The Other Value Is From Entering A Index Number
************************************Edited ********************************
I might have found a pattern
Sorry about the mess
The only layer in the drawing was layer "0"
There were 16 viewports in drawing
The color override was color 1 to 10 and 120 to 125
It did not go in order but the values after Command: GETLAYERVPOVERRIDE
Were generated using the GetViewportOverrides method
The values after Command: GETLAYERVPOVERRIDEEXTDIC
Were from getting the layer ExtensionDictionary and printing the DxfCode and value from the Xrecord "ADSK_XREC_LAYER_COLOR_OVR"
So as you can see
1 = -1023410175
2 = -1023410174
3 = -1023410173
......
......
125 = -1023410051
Command: GETLAYERVPOVERRIDE
red
yellow
green
cyan
blue
10
9
8
white
magenta
124
123
122
121
120
125
Command: GETLAYERVPOVERRIDEEXTDIC
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680016))
(420,-1023410175)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680040))
(420,-1023410174)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680072))
(420,-1023410173)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680104))
(420,-1023410172)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680136))
(420,-1023410171)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680168))
(420,-1023410166)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680200))
(420,-1023410167)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680232))
(420,-1023410168)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680264))
(420,-1023410169)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680296))
(420,-1023410170)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680392))
(420,-1023410052)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680424))
(420,-1023410053)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680456))
(420,-1023410054)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680488))
(420,-1023410055)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680520))
(420,-1023410056)
(102,})
(102,{ADSK_LYR_COLOR_OVERRIDE)
(335,(2129680616))
(420,-1023410051)
(102,})
Here is the C# code if anyone wants to see if they get the same values
[CommandMethod("GetLayerVpOverRide")]
public void GetLayerVpOverRide()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
using (Transaction trx = db.TransactionManager.StartTransaction())
{
LayerTable lyrTbl = (LayerTable)db.LayerTableId.GetObject(OpenMode.ForRead);
LayerTableRecord lyrTblRec = (LayerTableRecord)lyrTbl["0"].GetObject(OpenMode.ForRead);
ObjectIdCollection vpObjIds = new ObjectIdCollection();
vpObjIds = db.GetViewports(false);
foreach (ObjectId vpId in vpObjIds)
{
LayerViewportProperties lyrVp = lyrTblRec.GetViewportOverrides(vpId);
ed.WriteMessage("\n" + lyrVp.Color);
}
trx.Commit();
}
}
[CommandMethod("GetLayerVpOverRideExtDic")]
public void GetLayerVpOverRideExtDic()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
using (Transaction trx = db.TransactionManager.StartTransaction())
{
LayerTable lyrTbl = (LayerTable)db.LayerTableId.GetObject(OpenMode.ForRead);
LayerTableRecord lyrTblRec = (LayerTableRecord)lyrTbl["0"].GetObject(OpenMode.ForRead);
DBDictionary extDic = (DBDictionary)trx.GetObject(lyrTblRec.ExtensionDictionary, OpenMode.ForRead, false);
Xrecord xRec = (Xrecord)trx.GetObject(extDic.GetAt("ADSK_XREC_LAYER_COLOR_OVR"), OpenMode.ForRead, false);
ResultBuffer reBuff = xRec.Data;
TypedValue[] typVal = reBuff.AsArray();
for (int i = 0; i < typVal.Length; i++ )
{
ed.WriteMessage("\n" + typVal[i].ToString());
}
trx.Commit();
}
}