개정판 cb24157b
- SEC Drawing Exception Prevention
- Change non-plot layer, Object purge, UCS, Move Title box and Delete outside
Change-Id: Ice9aab4773d3079163ac3c47c3a9427586d13cac
DTI_PID/OdReadExMgd/OdReadExMgd.cs | ||
---|---|---|
3070 | 3070 |
} |
3071 | 3071 |
} |
3072 | 3072 |
} |
3073 |
catch (System.Exception) |
|
3073 |
catch (System.Exception ex)
|
|
3074 | 3074 |
{ |
3075 | 3075 |
} |
3076 | 3076 |
} |
... | ... | |
4153 | 4153 |
tr.Commit(); |
4154 | 4154 |
} |
4155 | 4155 | |
4156 |
// Viewport Ucs |
|
4157 |
using (ViewportTable pTable = (ViewportTable)pDb.ViewportTableId.Open(OpenMode.ForRead)) |
|
4158 |
{ |
|
4159 |
foreach (ObjectId id in pTable) |
|
4160 |
{ |
|
4161 |
using (ViewportTableRecord pRecord = (ViewportTableRecord)id.Open(OpenMode.ForRead)) |
|
4162 |
{ |
|
4163 |
if (pRecord.Name == "*Active") |
|
4164 |
{ |
|
4165 |
CoordinateSystem3d cs3d = pRecord.Ucs; |
|
4166 |
if (cs3d.Origin != Point3d.Origin || cs3d.Xaxis != new Vector3d(1, 0, 0) || cs3d.Yaxis != new Vector3d(0, 1, 0)) |
|
4167 |
{ |
|
4168 |
pRecord.UpgradeOpen(); |
|
4169 |
pRecord.SetUcsToWorld(); |
|
4170 |
} |
|
4171 |
if (pRecord.ViewTwist != 0) |
|
4172 |
{ |
|
4173 |
pRecord.UpgradeOpen(); |
|
4174 |
pRecord.ViewTwist = 0; |
|
4175 |
} |
|
4176 |
if (pRecord.ViewDirection != new Vector3d(0, 0, 1)) |
|
4177 |
{ |
|
4178 |
pRecord.UpgradeOpen(); |
|
4179 |
pRecord.ViewDirection = new Vector3d(0, 0, 1); |
|
4180 |
} |
|
4181 |
} |
|
4182 |
} |
|
4183 |
} |
|
4184 |
} |
|
4185 | ||
4156 | 4186 |
// SEC Title box Move & Erase |
4157 | 4187 |
using (BlockTable pTable = (BlockTable)pDb.BlockTableId.Open(OpenMode.ForRead)) |
4158 | 4188 |
{ |
... | ... | |
4217 | 4247 |
} |
4218 | 4248 |
} |
4219 | 4249 |
} |
4220 | ||
4221 |
// Viewport Ucs |
|
4222 |
using (ViewportTable pTable = (ViewportTable)pDb.ViewportTableId.Open(OpenMode.ForRead)) |
|
4223 |
{ |
|
4224 |
foreach (ObjectId id in pTable) |
|
4225 |
{ |
|
4226 |
using (ViewportTableRecord pRecord = (ViewportTableRecord)id.Open(OpenMode.ForRead)) |
|
4227 |
{ |
|
4228 |
if (pRecord.Name == "*Active") |
|
4229 |
{ |
|
4230 |
CoordinateSystem3d cs3d = pRecord.Ucs; |
|
4231 |
if (cs3d.Origin != Point3d.Origin || cs3d.Xaxis != new Vector3d(1, 0, 0) || cs3d.Yaxis != new Vector3d(0, 1, 0)) |
|
4232 |
{ |
|
4233 |
pRecord.UpgradeOpen(); |
|
4234 |
pRecord.SetUcsToWorld(); |
|
4235 |
} |
|
4236 |
if (pRecord.ViewTwist != 0) |
|
4237 |
{ |
|
4238 |
pRecord.UpgradeOpen(); |
|
4239 |
pRecord.ViewTwist = 0; |
|
4240 |
} |
|
4241 |
if (pRecord.ViewDirection != new Vector3d(0, 0, 1)) |
|
4242 |
{ |
|
4243 |
pRecord.UpgradeOpen(); |
|
4244 |
pRecord.ViewDirection = new Vector3d(0, 0, 1); |
|
4245 |
} |
|
4246 |
} |
|
4247 |
} |
|
4248 |
} |
|
4249 |
} |
|
4250 |
|
|
4250 | 4251 |
pDb.UpdateExt(true); |
4251 | 4252 |
} |
4252 | 4253 |
public void dumpHeader(Database pDb, int indent, XmlNode node) |
내보내기 Unified diff