Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Language="VBSCRIPT"
Sub CATMain()
Dim settingControllers1 As SettingControllers
Set settingControllers1 = CATIA.SettingControllers
Dim memoryWarningSettingAtt1 As SettingController
Set memoryWarningSettingAtt1 = settingControllers1.Item("CATSysMemoryWarningSettingCtrl")
Dim licenseSettingAtt1 As SettingController
Set licenseSettingAtt1 = settingControllers1.Item("CATSysLicenseSettingCtrl")
Dim Message, Style, Title, Response, SecString
Message = ("To get the SPA license click YES, to release it click NO" )
Style = vbYesNo + vbDefaultButton1 'Define default button
Title = "Purpose : change status of a specific license "
Response = MsgBox(Message, Style, Title)
If Response = vbYes Then ' User chose Yes.
Dim generalSessionSettingAtt1 As SettingController
Dim disconnectionSettingAtt1 As SettingController
''''''''''''''''''YES
licenseSettingAtt1.SetLicense "SPA.prd", "SPA.prd"
Set generalSessionSettingAtt1 = settingControllers1.Item("CATCafGeneralSessionSettingCtrl")
generalSessionSettingAtt1.SaveRepository
Set disconnectionSettingAtt1 = settingControllers1.Item("CATSysDisconnectionSettingCtrl")
disconnectionSettingAtt1.SaveRepository
memoryWarningSettingAtt1.SaveRepository
licenseSettingAtt1.SaveRepository
Else
''''''''''''''''''''''''NO
licenseSettingAtt1.SetLicense "SPA.prd", "NotRequested"
Set generalSessionSettingAtt1 = settingControllers1.Item("CATCafGeneralSessionSettingCtrl")
generalSessionSettingAtt1.SaveRepository
Set disconnectionSettingAtt1 = settingControllers1.Item("CATSysDisconnectionSettingCtrl")
disconnectionSettingAtt1.SaveRepository
memoryWarningSettingAtt1.SaveRepository
licenseSettingAtt1.SaveRepository
End If
End Sub