doc = ThisDoc.Document
Dim odocCompDef As ComponentDefinition = doc.ComponentDefinition
Dim oUParams As UserParameters =odocCompDef.Parameters.UserParameters
Dim oUParam As UserParameter
Try
oUParam = oUParams.Item("flag")
flag =Not flag
Catch
oUParam = oUParams.AddByValue("flag", False, "BOOLEAN")
End Try
If flag = False Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Light Gray Theme.png"
Else If flag = True Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Dark Blue Theme.png"
End If
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
王 承之
Autodesk AGN [Inventor 俱乐部] Leader
Inventor Club | Bilibili
doc = ThisDoc.Document
Dim odocCompDef As ComponentDefinition = doc.ComponentDefinition
Dim oUParams As UserParameters =odocCompDef.Parameters.UserParameters
Dim oUParam As UserParameter
Try
oUParam = oUParams.Item("flag")
Catch
oUParam = oUParams.AddByValue("flag", False, "BOOLEAN")
End Try
If flag = False Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Light Gray Theme.png"
flag = True
Else If flag = True Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Dark Blue Theme.png"
flag = False
End If
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
王 承之
Autodesk AGN [Inventor 俱乐部] Leader
Inventor Club | Bilibili
软件什么版本?
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
王 承之
Autodesk AGN [Inventor 俱乐部] Leader
Inventor Club | Bilibili
或者你试试这个
If ThisApplication.ActiveColorScheme.ImageFullFileName = "Light Gray Theme.png" Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Dark Blue Theme.png"
ElseIf ThisApplication.ActiveColorScheme.ImageFullFileName = "Dark Blue Theme.png" Then
ThisApplication.ActiveColorScheme.ImageFullFileName = "Light Gray Theme.png"
End If
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
王 承之
Autodesk AGN [Inventor 俱乐部] Leader
Inventor Club | Bilibili
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
如果我的回帖解决了您的问题,请点击 "接受为解决方案" 按钮. 这可以帮助其他人更快的找到解决方案!
王 承之
Autodesk AGN [Inventor 俱乐部] Leader
Inventor Club | Bilibili