프로젝트

일반

사용자정보

개정판 3ebe4712

ID3ebe4712ba7c457664e9f2abf61c256b36e9bfd3
상위 a1a55823
하위 a7c63998

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #507 : fix InputEndBreakAttribute

Change-Id: Iaf9224102a10cfbee73137dba2325b1aa8e03b6e

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
4473 4473
                            if (modelItemIDs.Count == 1)
4474 4474
                            {
4475 4475
                                LMModelItem modelItem = dataSource.GetModelItem(modelItemIDs[0]);
4476
                                object value = modelItem.Attributes["TagSequenceNo"].get_Value();
4477
                                ZeroLengthModelItem.Attributes["TagSequenceNo"].set_Value(value);
4478
                                ZeroLengthModelItem.Commit();
4476
                                LMConnector onlyOne = GetLMConnectorOnlyOne(modelItem.Id);
4477
                                if (onlyOne != null && Convert.ToBoolean(onlyOne.get_IsZeroLength()))
4478
                                {
4479
                                    bool result = false;
4480
                                    foreach (LMLabelPersist loop in onlyOne.LabelPersists)
4481
                                    {
4482
                                        if (document.EndBreaks.Find(x => x.SPPID.RepresentationId == loop.RepresentationID) != null)
4483
                                            result = true;
4484
                                        ReleaseCOMObjects(loop);
4485
                                    }
4486

  
4487
                                    if (result)
4488
                                    {
4489
                                        object value = modelItem.Attributes["TagSequenceNo"].get_Value();
4490
                                        ZeroLengthModelItem.Attributes["TagSequenceNo"].set_Value(value);
4491
                                        ZeroLengthModelItem.Commit();
4492
                                    }
4493
                                    else
4494
                                    {
4495
                                        List<string> loopModelItems = new List<string>();
4496
                                        if (onlyOne.ConnectItem1SymbolObject.get_RepresentationType() == "Branch")
4497
                                        {
4498
                                            LMSymbol _symbol = onlyOne.ConnectItem1SymbolObject;
4499
                                            foreach (LMConnector loop in _symbol.Connect1Connectors)
4500
                                            {
4501
                                                if (loop.get_ItemStatus() == "Active" && loop.ModelItemID != onlyOne.ModelItemID)
4502
                                                    loopModelItems.Add(loop.ModelItemID);
4503
                                                ReleaseCOMObjects(loop);
4504
                                            }
4505
                                            ReleaseCOMObjects(_symbol);
4506
                                            _symbol = null;
4507
                                        }
4508
                                        else if (onlyOne.ConnectItem2SymbolObject.get_RepresentationType() == "Branch")
4509
                                        {
4510
                                            LMSymbol _symbol = onlyOne.ConnectItem1SymbolObject;
4511
                                            foreach (LMConnector loop in _symbol.Connect1Connectors)
4512
                                            {
4513
                                                if (loop.get_ItemStatus() == "Active" && loop.ModelItemID != onlyOne.ModelItemID)
4514
                                                    loopModelItems.Add(loop.ModelItemID);
4515
                                                ReleaseCOMObjects(loop);
4516
                                            }
4517
                                            ReleaseCOMObjects(_symbol);
4518
                                            _symbol = null;
4519
                                        }
4520

  
4521
                                        loopModelItems = loopModelItems.Distinct().ToList();
4522
                                        if (loopModelItems.Count == 1)
4523
                                        {
4524
                                            LMModelItem loopModelItem = dataSource.GetModelItem(loopModelItems[0]);
4525
                                            object value = loopModelItem.Attributes["TagSequenceNo"].get_Value();
4526
                                            ZeroLengthModelItem.Attributes["TagSequenceNo"].set_Value(value);
4527
                                            ZeroLengthModelItem.Commit();
4528

  
4529
                                            ReleaseCOMObjects(loopModelItem);
4530
                                            loopModelItem = null;
4531
                                        }
4532
                                    }
4533
                                }
4534
                                else
4535
                                {
4536
                                    object value = modelItem.Attributes["TagSequenceNo"].get_Value();
4537
                                    ZeroLengthModelItem.Attributes["TagSequenceNo"].set_Value(value);
4538
                                    ZeroLengthModelItem.Commit();
4539
                                }
4479 4540
                                ReleaseCOMObjects(modelItem);
4480 4541
                                modelItem = null;
4542
                                ReleaseCOMObjects(onlyOne);
4543
                                onlyOne = null;
4481 4544
                            }
4482 4545
                        }
4483 4546
                        ReleaseCOMObjects(connector);

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)