This function sets the specified status.
1 | srstActive |
2 | srstInactive |
3 | srstDiscontinued |
object.SetStatus
Value
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISService interface |
|
Value |
In, Required | int |
The status value |
Display the number of the services and their statuses before and after change.
Dim aFilter
Dim aService
Dim aServices
Dim aMessage
Dim i
Set aFilter = Profile.CreateServicesFilter
aFilter.Description = "Injection"
set aServices = Profile.LoadServicesByFilter(aFilter)
set aTrans = Profile.StartMapTransaction
aMessage = "Services Count = " & aServices.Count & vbNewLine
for i = 0 to aServices.Count - 1
set aService = aServices.Item(i)
aMessage = vbNewLine & aMessage & "The service '" & aService.Description & "'" &_
vbNewLine & "The status before change is " & aService.Status
next
aTrans.SnapShot
aService.SetStatus(2)
set aServices = Profile.LoadServicesByFilter(aFilter)
aMessage = aMessage & vbNewLine & "----------------------------" & vbNewLine &_
"The status after change is " & aService.Status
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Status can be found and set in
.