개정판 9133d5d8
dev issue #683: 2개의 심볼 모델링
DTI_PID/SPPIDConverter/Drawing.vb | ||
---|---|---|
456 | 456 |
Private _SIZE As String |
457 | 457 |
Private _ANGLE As String |
458 | 458 |
Private _PARENT As String |
459 |
Private _CHILD As String |
|
459 |
Private _CHILD As List(Of String) = New List(Of String) |
|
460 |
Private _CHILD_SPPID_ITEM_OBJECT As List(Of Object) = New List(Of Object) |
|
460 | 461 |
Private _HASINSTRUMENTLABEL As String |
461 | 462 |
Private _CURRENTPOINTMODEINDEX As String |
462 | 463 |
|
... | ... | |
522 | 523 |
End Set |
523 | 524 |
End Property |
524 | 525 |
|
525 |
Public Property CHILD As String |
|
526 |
Get |
|
527 |
Return _CHILD |
|
528 |
End Get |
|
529 |
Set(value As String) |
|
530 |
_CHILD = value |
|
531 |
End Set |
|
532 |
End Property |
|
533 |
|
|
534 | 526 |
Public Property HASINSTRUMENTLABEL As String |
535 | 527 |
Get |
536 | 528 |
Return _HASINSTRUMENTLABEL |
... | ... | |
594 | 586 |
End Set |
595 | 587 |
End Property |
596 | 588 |
|
589 |
Public Property CHILD As List(Of String) |
|
590 |
Get |
|
591 |
Return _CHILD |
|
592 |
End Get |
|
593 |
Set(value As List(Of String)) |
|
594 |
_CHILD = value |
|
595 |
End Set |
|
596 |
End Property |
|
597 |
|
|
598 |
Public Property CHILD_SPPID_ITEM_OBJECT As List(Of Object) |
|
599 |
Get |
|
600 |
Return _CHILD_SPPID_ITEM_OBJECT |
|
601 |
End Get |
|
602 |
Set(value As List(Of Object)) |
|
603 |
_CHILD_SPPID_ITEM_OBJECT = value |
|
604 |
End Set |
|
605 |
End Property |
|
606 |
|
|
597 | 607 |
Public Overrides Sub Modeling() |
598 | 608 |
|
599 | 609 |
Dim _Placement As Placement = New Placement |
... | ... | |
622 | 632 |
SPPID_ITEM_OBJECT = _Placement.PIDPlaceSymbol(sysPath, LOCATION_X, LOCATION_Y, Rotation:=ANGLE, Mirror:=MIRROR) |
623 | 633 |
End If |
624 | 634 |
|
635 |
'' Check Child |
|
636 |
For Each _child As String In CHILD |
|
637 |
Dim arrChild As String() = _child.Split(",") |
|
638 |
Dim arrow As String = arrChild(0) |
|
639 |
Dim mappingName As String = arrChild(1) |
|
640 |
|
|
641 |
Dim childAngle As Double = 0 |
|
642 |
If arrow = "UP" Then |
|
643 |
childAngle = 0 |
|
644 |
ElseIf arrow = "RIGHT" Then |
|
645 |
childAngle = 90 * Math.PI / 180 |
|
646 |
ElseIf arrow = "DOWN" Then |
|
647 |
childAngle = Math.PI |
|
648 |
Else |
|
649 |
childAngle = 270 * Math.PI / 180 |
|
650 |
End If |
|
651 |
|
|
652 |
Dim _childLmSymbol As LMSymbol = _Placement.PIDPlaceSymbol(mappingName, LOCATION_X, LOCATION_Y, Mirror:=0, Rotation:=childAngle, TargetItem:=SPPID_ITEM_OBJECT) |
|
653 |
CHILD_SPPID_ITEM_OBJECT.Add(_childLmSymbol) |
|
654 |
Next |
|
655 |
|
|
625 | 656 |
SPPID_ITEM_OBJECT.Commit() |
626 | 657 |
Debug.WriteLine(LOCATION_X.ToString + "," + LOCATION_Y.ToString + "/" + UID + "/" + SIZE) |
627 | 658 |
End If |
내보내기 Unified diff