프로젝트

일반

사용자정보

개정판 7824381a

ID7824381a86861bd1c47fd299b7724908b4e9149e
상위 20c84e05
하위 d19ba988, 577b73ac

Gyusu 이(가) 약 7년 전에 추가함

XML Format update

차이점 보기:

DTI_PID/SPPIDConverter/Main.vb
839 839

  
840 840
    Private Sub ThreadTask()
841 841

  
842
    End Sub
842 843

  
843
        If _XMLList.Items.Count > 0 Then
844 844

  
845
            Dim oDwg_Dt As DataTable = LoadAllDrawing()
846
            Dim iDwgCnt As Integer = 0
847
            Dim objPIDAutoApp As Object
848
            objPIDAutoApp = CreateObject("PIDAutomation.Application")
845
    'Private Sub ThreadTask()
849 846

  
850 847

  
851
            Dim myList = DirectCast(Invoke(New GetListViewDelegate(AddressOf GetListViewItems), _XMLList), List(Of String))
852
            For i = 0 To myList.Count - 1
848
    '    If _XMLList.Items.Count > 0 Then
853 849

  
854
                Dim sDwgName As String = Path.GetFileNameWithoutExtension(myList(i))
855
                Txt_Status.Text = sDwgName & "..(" & i + 1 & "/" & myList.Count & ")"
856
                SetListBoxItems(ListBox_Result, Txt_Status.Text & " 처리중....")
857
                Dim sDwgNo As String = myList(i)
858
                Dim oDwgPath As String = ""
859
                oDwgPath = _selectFolderPath + "\" + sDwgNo
850
    '        Dim oDwg_Dt As DataTable = LoadAllDrawing()
851
    '        Dim iDwgCnt As Integer = 0
852
    '        Dim objPIDAutoApp As Object
853
    '        objPIDAutoApp = CreateObject("PIDAutomation.Application")
860 854

  
861
                Dim sPath As String = OpenDrawing(oDwg_Dt, sDwgName)
862
                If sPath <> "" Then
863 855

  
864
                    Process.Start(sPath)
856
    '        Dim myList = DirectCast(Invoke(New GetListViewDelegate(AddressOf GetListViewItems), _XMLList), List(Of String))
857
    '        For i = 0 To myList.Count - 1
865 858

  
866
                    Dim bCheckOpenDrawing As Boolean = False
867
                    While (True)
868
                        bCheckOpenDrawing = CheckOpenDrawing()
869
                        If bCheckOpenDrawing = True Then
870
                            Exit While
871
                        Else
872
                            Thread.Sleep(2000)
873
                        End If
874
                    End While
859
    '            Dim sDwgName As String = Path.GetFileNameWithoutExtension(myList(i))
860
    '            Txt_Status.Text = sDwgName & "..(" & i + 1 & "/" & myList.Count & ")"
861
    '            SetListBoxItems(ListBox_Result, Txt_Status.Text & " 처리중....")
862
    '            Dim sDwgNo As String = myList(i)
863
    '            Dim oDwgPath As String = ""
864
    '            oDwgPath = _selectFolderPath + "\" + sDwgNo
875 865

  
876
                    If bCheckOpenDrawing Then
877
                        SetListBoxItems(ListBox_Result, sDwgName & " 도면 Open....")
878
                        Dim oPipe_Dt As DataTable = New DataTable() 'LoadPipeInXml(oDwgPath)
866
    '            Dim sPath As String = OpenDrawing(oDwg_Dt, sDwgName)
867
    '            If sPath <> "" Then
879 868

  
880
                        Dim oSymbol_Dt As DataTable = LoadSymbolInXml(oDwgPath)
881
                        Dim oTreeNode As New TreeNode  'SetTreeViewItems(Tree_Result, Tree_Result.Nodes, sDwgName, sDwgName)
882
                        'oTreeNode = Tree_Result.Nodes.Find(sDwgName, True)(0)
883
                        Dim action As Action = Sub()
884
                                                   oTreeNode = Tree_Result.Nodes.Add(sDwgName, sDwgName)
885
                                                   SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Instruments", "Instuments")
886
                                                   SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Pipes", "Pipes")
887
                                                   SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Valves", "Valves")
888
                                                   SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Fittings", "Fittings")
889
                                                   oTreeNode.ExpandAll()
890
                                               End Sub
891
                        Tree_Result.Invoke(action)
869
    '                Process.Start(sPath)
892 870

  
871
    '                Dim bCheckOpenDrawing As Boolean = False
872
    '                While (True)
873
    '                    bCheckOpenDrawing = CheckOpenDrawing()
874
    '                    If bCheckOpenDrawing = True Then
875
    '                        Exit While
876
    '                    Else
877
    '                        Thread.Sleep(2000)
878
    '                    End If
879
    '                End While
893 880

  
894
                        '    oTreeNode.Expand()
895
                        SetListBoxItems(ListBox_Result, sDwgName & " Auto converting 대기....")
896
                        AutoConverting(oPipe_Dt, oSymbol_Dt, oTreeNode)
881
    '                If bCheckOpenDrawing Then
882
    '                    SetListBoxItems(ListBox_Result, sDwgName & " 도면 Open....")
883
    '                    Dim oPipe_Dt As DataTable = New DataTable() 'LoadPipeInXml(oDwgPath)
897 884

  
898
                    End If
885
    '                    Dim oSymbol_Dt As DataTable = LoadSymbolInXml(oDwgPath)
886
    '                    Dim oTreeNode As New TreeNode  'SetTreeViewItems(Tree_Result, Tree_Result.Nodes, sDwgName, sDwgName)
887
    '                    'oTreeNode = Tree_Result.Nodes.Find(sDwgName, True)(0)
888
    '                    Dim action As Action = Sub()
889
    '                                               oTreeNode = Tree_Result.Nodes.Add(sDwgName, sDwgName)
890
    '                                               SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Instruments", "Instuments")
891
    '                                               SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Pipes", "Pipes")
892
    '                                               SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Valves", "Valves")
893
    '                                               SetTreeViewItems(Tree_Result, oTreeNode.Nodes, sDwgName & "\Fittings", "Fittings")
894
    '                                               oTreeNode.ExpandAll()
895
    '                                           End Sub
896
    '                    Tree_Result.Invoke(action)
899 897

  
900
                End If
901
                ''도면 생성
902
                'If CreateDwg(sDwgName) Then
903
                '    'AutoConverting
904 898

  
905
                'End If
899
    '                    '    oTreeNode.Expand()
900
    '                    SetListBoxItems(ListBox_Result, sDwgName & " Auto converting 대기....")
901
    '                    AutoConverting(oPipe_Dt, oSymbol_Dt, oTreeNode)
906 902

  
907
            Next
908
        End If
909
    End Sub
903
    '                End If
904

  
905
    '            End If
906
    '            ''도면 생성
907
    '            'If CreateDwg(sDwgName) Then
908
    '            '    'AutoConverting
909

  
910
    '            'End If
911

  
912
    '        Next
913
    '    End If
914
    'End Sub
910 915

  
911 916

  
912 917
    Private Function CheckOpenDrawing() As Boolean

내보내기 Unified diff