| Ortam | Kullanılabilirlik |
|---|---|
| Engineering Studio | Kullanılmaz |
| Service Engine | Kullanılabilir |
| VBA | Kullanılabilir |
| VSTA | Kullanılabilir |
C#
publicvoid MacroTraceUpcomingShiftsToCEL()
{
//create a shift filter
zenOn.IShiftFilter shiftFilter = this.ShiftManagement.Calendar.CreateShiftFilter();
//set the filter to the next 24 hours
shiftFilter.StartTime = DateTime.Now;
shiftFilter.EndTime = DateTime.Now.AddDays(1);
//get shift list for filter
zenOn.IShifts shifts = shiftFilter.GetShifts();
if (shifts != null)
{
// interate shift list
for (int index = 0; index < shifts.Count; index++)
{
zenOn.IShift shift = shifts.GetItem(index);
//create string containing shift information
String shiftString = "Name:" + shift.Name + " Description:" + shift.Description + " start:" + shift.StartTime.ToString() + " end:" + shift.EndTime.ToString();
//wirte shift into cel
Cel().WriteCelString(shiftString);
}
}
}
VBA
Public Sub TraceUpcomingShiftsToCEL()
'create a shift filter
Dim filter As ShiftFilter
Set filter = thisProject.ShiftManagement.Calendar.CreateShiftFilter
'set the filter to the next 24 hours
filter.StartTime = Now()
filter.EndTime = Now() + 1
'get shift list for filter
Dim shiftList As Shifts
Set shiftList = filter.GetShifts
If Not shiftList Is Nothing Then
'interate shift list
For i = 0 To shiftList.Count - 1
Dim currentShift As Shift
Set currentShift = shiftList.GetItem(i)
'create string containing shift information
Dim shiftString As String
shiftString = "name:" & currentShift.Name & " desc:" & currentShift.Description & " begin:" & CStr(currentShift.StartTime) & " end:" & CStr(currentShift.EndTime)
'write shift info to CEL
thisProject.Cel.WriteCelString "shift:" & shiftString
Next
End If
End SubBu konuda sorunuz mu var?SGE AI bu sayfaya ve ilgili yardım konularına dayanarak yanıtlar.
Bu bölümdeki konular
Bu sayfa, COPA-DATA zenon 16 çevrimiçi yardımının Türkçe çevirisidir. Menü ve ayar adları, programdaki gibi bulmanız için İngilizce bırakılmıştır.