protected DBDictionary WriteImageDictionary(DBDictionary parentDict, Transaction t) { DBDictionary result; try { parentDict.UpgradeOpen(); DBDictionary dBDictionary = new DBDictionary(); this.AcadDictionaryID = parentDict.SetAt(base.Name, dBDictionary); dBDictionary.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(dBDictionary, true); DocUtil.WriteXRecord(t, dBDictionary, "AutoCADID", (DxfCode)330, base.RasterObjectId); DocUtil.WriteXRecord(t, dBDictionary, "ServiceFullName", (DxfCode)1, this.ServiceFullName); DocUtil.WriteXRecord(t, dBDictionary, "ConnectionName", (DxfCode)1, base.ConnectionName); DocUtil.WriteXRecord(t, dBDictionary, "ConnectionURL", (DxfCode)1, base.ConnectionURL); DocUtil.WriteXRecord(t, dBDictionary, "UserName", (DxfCode)1, base.UserName); if (base.Dynamic) { Xrecord xrecord = new Xrecord(); xrecord.Data = (new ResultBuffer(new TypedValue[] { new TypedValue(290, true) })); dBDictionary.SetAt("Dynamic", xrecord); xrecord.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(xrecord, true); } DocUtil.WriteBoundingBox(t, dBDictionary, base.BoundaryExtent); DocUtil.WriteXRecord(t, dBDictionary, "ImageFormat", (DxfCode)1, base.ExportOptions.Format); DocUtil.WriteXRecord(t, dBDictionary, "Compression", (DxfCode)1, base.ExportOptions.TransCompression); DocUtil.WriteXRecord(t, dBDictionary, "Quality", (DxfCode)90, base.ExportOptions.Quality); DocUtil.WriteXRecord(t, dBDictionary, "Interpolation", (DxfCode)1, base.ExportOptions.Interpolation); DocUtil.WriteXRecord(t, dBDictionary, "MosaicMethod", (DxfCode)1, base.ExportOptions.MosaicMethod); DocUtil.WriteXRecord(t, dBDictionary, "OrderField", (DxfCode)1, base.ExportOptions.OrderField); DocUtil.WriteXRecord(t, dBDictionary, "OrderBaseValue", (DxfCode)1, base.ExportOptions.OrderBaseValue); DocUtil.WriteXRecord(t, dBDictionary, "LockRasterID", (DxfCode)1, base.ExportOptions.LockRasterID); DocUtil.WriteXRecord(t, dBDictionary, "Ascending", (DxfCode)290, base.ExportOptions.Ascending); DocUtil.WriteXRecord(t, dBDictionary, "MosaicOperator", (DxfCode)1, base.ExportOptions.MosaicOperator); result = dBDictionary; } catch (Exception ex) { string arg_209_0 = ex.Message; result = null; } return(result); }
public DBDictionary WriteMapLayer(DBDictionary parentDict, Transaction t) { DBDictionary dBDictionary = new DBDictionary(); try { parentDict.SetAt(this.FixName(this.Name), dBDictionary); dBDictionary.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(dBDictionary, true); DocUtil.WriteXRecord(t, dBDictionary, "MapLayerName", (DxfCode)1, this.Name); DocUtil.WriteXRecord(t, dBDictionary, "ID", (DxfCode)90, this.ID); DocUtil.WriteXRecord(t, dBDictionary, "ParentID", (DxfCode)90, this.ParentLayerID); if (this.Visible) { Xrecord xrecord = new Xrecord(); xrecord.Data = (new ResultBuffer(new TypedValue[] { new TypedValue(290, true) })); dBDictionary.SetAt("Visible", xrecord); xrecord.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(xrecord, true); } } catch { } try { if (this.Layers != null && this.Layers.Count > 0) { DBDictionary dBDictionary2 = new DBDictionary(); dBDictionary.SetAt("ChildLayers", dBDictionary2); t.AddNewlyCreatedDBObject(dBDictionary2, true); foreach (MSCMapLayer current in this.Layers) { current.WriteMapLayer(dBDictionary2, t); } } } catch { } return(dBDictionary); }
protected DBDictionary WriteMapDictionary(DBDictionary parentDict, Transaction t) { DBDictionary result; try { parentDict.UpgradeOpen(); DBDictionary dBDictionary = new DBDictionary(); this.AcadDictionaryID = parentDict.SetAt(base.Name, dBDictionary); dBDictionary.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(dBDictionary, true); DocUtil.WriteXRecord(t, dBDictionary, "AutoCADID", (DxfCode)330, base.RasterObjectId); DocUtil.WriteXRecord(t, dBDictionary, "ServiceFullName", (DxfCode)1, this.ServiceFullName); DocUtil.WriteXRecord(t, dBDictionary, "ConnectionName", (DxfCode)1, base.ConnectionName); DocUtil.WriteXRecord(t, dBDictionary, "ConnectionURL", (DxfCode)1, base.ConnectionURL); DocUtil.WriteXRecord(t, dBDictionary, "UserName", (DxfCode)1, base.UserName); if (base.Dynamic) { Xrecord xrecord = new Xrecord(); xrecord.Data = (new ResultBuffer(new TypedValue[] { new TypedValue(290, true) })); dBDictionary.SetAt("Dynamic", xrecord); xrecord.DisableUndoRecording(true); t.AddNewlyCreatedDBObject(xrecord, true); } DocUtil.WriteBoundingBox(t, dBDictionary, base.BoundaryExtent); DocUtil.WriteXRecord(t, dBDictionary, "ImageFormat", (DxfCode)1, base.ExportOptions.Format); result = dBDictionary; } catch (Exception ex) { string arg_122_0 = ex.Message; result = null; } return(result); }