iLogic程序编制过程
1.判断是否已经登录Vault
2.判断这个文件是否在Vault中已经存在
3.如果不存在,结束程序
4.如果存在,获得文件属性和ITEM属性
Sub Main
If iLogicVault.LoggedIn = False
Logger.Error("Not Logged In to Vault! - Login first and repeat executing this rule.")
Exit Sub
End If
Dim mVaultFileProps As System.Collections.Generic.Dictionary(Of String, String) = New Dictionary(Of String, String)
Dim mVaultItemProps As System.Collections.Generic.Dictionary(Of String, String) = New Dictionary(Of String, String)
Dim mVaultFile As String = iLogicVault.GetFileByFullFilePath("$/Designs/Inventor Sample Data/Fishing Rod/Back Side Cover.ipt", mVaultFileProps, mVaultItemProps)
If mVaultFile Is Nothing Then
Logger.Error("Vault file not found. Please double check that file path is correct or that the file exists in Vault.")
Else
Logger.Info("File " & mVaultFile & " (including dependent and attachment files) downloaded.")
For Each item In mVaultFileProps
Logger.Info("Vault File Property Name/Value: " + item.Key + " = " + item.Value)
Next
For Each item In mVaultItemProps
Logger.Info("Vault linked Item Property Name/Value: " + item.Key + " = " + item.Value)
Next
Logger.Info("File " & mVaultFile & " download finished.")
End If
End Sub
网友评论