Показать сообщение отдельно
Старый 09.03.2013, 13:33    | »»» |  #16
SK
Администратор
 
Аватар для SK
 
Регистрация: 27.05.2010
Сообщений: 29,976
SK has much to be proud ofSK has much to be proud ofSK has much to be proud ofSK has much to be proud ofSK has much to be proud ofSK has much to be proud ofSK has much to be proud ofSK has much to be proud of
Отправить сообщение для SK с помощью Skype™
По умолчанию

Не спешите...

Код:
Sub Кнопка1_Щелчок()
    Set AG = CreateObject("AutoGRAPH.AutoGRAPHAutomation")
    Range("A8:Z65536").Clear
    AG.SetGroupIndexByFileName Cells(1, 2)
    AG.SetCarIndexByDevice Cells(2, 2)
    AG.ComputingTimeout = 15 'таймаут на расчет
    AG.WaitForComputing Cells(1, 2), Cells(2, 2), Cells(3, 2), Cells(4, 2), "GSM", 1
    Tripsnum = AG.Tripsnum
    Cells(8, 1) = "Кол-во рейсов:"
    Cells(8, 2) = Tripsnum
    Cells(9, 1) = "Файл КТ:"
    Cells(9, 2) = AG.CarCheckPointsFile
    SR = 11 ' начальная строка для вывода информации о рейсах и КТ
    If Tripsnum > 0 Then
        For x = 1 To Tripsnum
            AG.TripIndex = x
            AG.TripEntriesListTypeName = "checkpoints"
            AG.TripEntriesListKindName = "points"
            KTNum = AG.TripEntriesNum
            Cells(SR, 1) = "РЕЙС №"
            Cells(SR, 2) = x
            SR = SR + 1
            Cells(SR, 1) = "Кол-во КТ:"
            Cells(SR, 2) = KTNum
            SR = SR + 1
            If KTNum > 0 Then
                Cells(SR, 1) = "№ КТ"
                Cells(SR, 2) = "Имя КТ"
                Cells(SR, 3) = "Начало"
                Cells(SR, 4) = "Конец"
                SR = SR + 1
                For xx = 1 To KTNum
                    AG.EntryIndex = xx
                    Cells(SR, 1) = xx
                    Cells(SR, 2) = AG.EntryStartName
                    Cells(SR, 3) = AG.EntryStartRealTime
                    Cells(SR, 4) = AG.EntryEndRealTime
                    SR = SR + 1
                Next xx
                SR = SR + 1
            End If
        Next x
    End If
End Sub

ООО «ТехноКом», г. Челябинск
Самцов Константин Юрьевич - зам. директора по коммерческой деятельности
SK вне форума   Ответить с цитированием