private void InternListTable(ref int rlngIdx) { AcadBlock dobjAcadBlock4 = (AcadBlock)mobjAcadBlocks.FriendGetItem("*Model_Space"); if (dobjAcadBlock4 != null) { InternListBlock(ref rlngIdx, dobjAcadBlock4); } dobjAcadBlock4 = (AcadBlock)mobjAcadBlocks.FriendGetItem("*Paper_Space"); int dlngCount = 0; while (dobjAcadBlock4 != null) { InternListBlock(ref rlngIdx, dobjAcadBlock4); dobjAcadBlock4 = (AcadBlock)mobjAcadBlocks.FriendGetItem("*Paper_Space" + Conversions.ToString(dlngCount)); dlngCount = checked (dlngCount + 1); } IEnumerator enumerator = default(IEnumerator); try { enumerator = mobjAcadBlocks.GetValues().GetEnumerator(); while (enumerator.MoveNext()) { dobjAcadBlock4 = (AcadBlock)enumerator.Current; string dstrName = dobjAcadBlock4.Name; if (!LikeOperator.LikeString(dstrName, "[*]Model_Space", CompareMethod.Binary) & !LikeOperator.LikeString(dstrName, "[*]Paper_Space*", CompareMethod.Binary)) { InternListBlock(ref rlngIdx, dobjAcadBlock4); } } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } dobjAcadBlock4 = null; }
private bool InternReadBlockData(ref int rlngIdx, ref AcadBlock robjAcadBlock, ref string nrstrErrMsg) { nrstrErrMsg = null; robjAcadBlock = null; checked { bool dblnError = default(bool); if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx], 2, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Blockname in Zeile " + Conversions.ToString(rlngIdx * 2 + 1) + "."; dblnError = true; } else { string dstrName = Conversions.ToString(mobjDictReadValues[rlngIdx]); InternIncreaseIndex(ref rlngIdx, 1); robjAcadBlock = (AcadBlock)mobjAcadBlocks.FriendGetItem(dstrName); if (robjAcadBlock == null) { nrstrErrMsg = "Ungültiger Blockname in Zeile " + Conversions.ToString(rlngIdx * 2) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx], 70, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Standard-Flag-Werte in Zeile " + Conversions.ToString(rlngIdx * 2 + 1) + "."; dblnError = true; } else { int dlngCode70 = Conversions.ToInteger(mobjDictReadValues[rlngIdx]); InternIncreaseIndex(ref rlngIdx, 1); if (Operators.ConditionalCompareObjectEqual(mobjDictReadCodes[rlngIdx], 71, TextCompare: false)) { int dlngCode71 = Conversions.ToInteger(mobjDictReadValues[rlngIdx]); InternIncreaseIndex(ref rlngIdx, 1); } if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx], 10, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Basispunkt X-Wert in Zeile " + Conversions.ToString(rlngIdx * 2 + 1) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx + 1], 20, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Basispunkt Y-Wert in Zeile " + Conversions.ToString(rlngIdx * 2 + 3) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx + 2], 30, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Basispunkt Z-Wert in Zeile " + Conversions.ToString(rlngIdx * 2 + 5) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx + 3], 3, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für Blockname in Zeile " + Conversions.ToString(rlngIdx * 2 + 7) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadValues[rlngIdx + 3], dstrName, TextCompare: false)) { nrstrErrMsg = "Ungültiger Blockname in Zeile " + Conversions.ToString(rlngIdx * 2 + 8) + "."; dblnError = true; } else if (Operators.ConditionalCompareObjectNotEqual(mobjDictReadCodes[rlngIdx + 4], 1, TextCompare: false)) { nrstrErrMsg = "Ungültiger Gruppencode für XRef-Pfadname in Zeile " + Conversions.ToString(rlngIdx * 2 + 9) + "."; dblnError = true; } else { bool flag = false; double ddblOriginX = Conversions.ToDouble(mobjDictReadValues[rlngIdx]); double ddblOriginY = Conversions.ToDouble(mobjDictReadValues[rlngIdx + 1]); double ddblOriginZ = Conversions.ToDouble(mobjDictReadValues[rlngIdx + 2]); string dstrPathName = Conversions.ToString(mobjDictReadValues[rlngIdx + 4]); InternIncreaseIndex(ref rlngIdx, 5); string dstrComment; if (Operators.ConditionalCompareObjectEqual(mobjDictReadCodes[rlngIdx], 4, TextCompare: false)) { dstrComment = Conversions.ToString(mobjDictReadValues[rlngIdx]); InternIncreaseIndex(ref rlngIdx, 1); } else { dstrComment = null; } AcadBlock acadBlock = robjAcadBlock; bool flag2 = false; acadBlock.Origin = new object[3] { ddblOriginX, ddblOriginY, ddblOriginZ }; acadBlock.Comment = dstrComment; acadBlock.FriendLetPathName = dstrPathName; acadBlock.FriendLetFlags70 = dlngCode70; acadBlock = null; } } } return(!dblnError); } }