

PrpType = "Date" Case SwDmCustomInfoType.swDmCustomInfoNumber PrintProperties vNames, prpTypes, prpLinkedTo, prpValues, " " End If Next Elseĭebug.Print " -No Cut Lists-" End If Next End Sub Sub PrintProperties(vPrpNames As Variant, vTypes As Variant, vLinkedTo As Variant, vValues As Variant, indent As String)ĭim i As Integer If Not IsEmpty(vPrpNames) Then For i = 0 To UBound(vPrpNames)ĭim prpVal As String Dim prpResVal As StringĮnd If Dim prpType As String Select Case vTypes(i)Ĭase SwDmCustomInfoType.swDmCustomInfoDate PrpValues(k) = swDmCutList.GetCustomPropertyValue2( CStr(vNames(k)), prpTypes(k), prpLinkedTo(k))

If Not IsEmpty(vNames) Then ReDim prpTypes(UBound(vNames))ĭim k As Integer For k = 0 To UBound(vNames) VNames = swDmCutList.GetCustomPropertyNames() If Not IsEmpty(vCutListItems) Then Dim j As Integer For j = 0 To UBound(vCutListItems)ĭim swDmCutList As SwDocumentMgr.SwDMCutListItem3ĭim vNames As Variant Dim prpTypes() As SwDmCustomInfoTypeĭim prpLinkedTo() As String Dim prpValues() As String PrintProperties vNames, vTypes, vLinkedTo, vValues, " " Next End Sub Sub PrintCutListProperties(dmDoc As SwDocumentMgr.SwDMDocument19)ĭebug.Print "Cut List Properties" For i = 0 To UBound(vConfNames)ĭim swDmConf As SwDocumentMgr.SwDMConfiguration16

SwDmConf.GetAllCustomPropertyNamesAndValues vNames, vTypes, vValues, vLinkedTo Set swDmConf = (confName)ĭim vNames As Variant Dim vTypes As Variant Dim vLinkedTo As Variant Dim vValues As Variant 'NOTE: order of resolved and expressions is not correct for configurations in SW DM API, so reversing the variables VConfNames = ()ĭebug.Print "Configuration Specific Properties" For i = 0 To UBound(vConfNames)ĭim swDmConf As SwDocumentMgr.SwDMConfiguration13 PrintProperties vNames, vTypes, vLinkedTo, vValues, " " End Sub Sub PrintConfigurationSpecificProperties(dmDoc As SwDocumentMgr.SwDMDocument19) MsgBox "Document Manager SDK is not installed" End If End Sub Sub PrintGeneralProperties(dmDoc As SwDocumentMgr.SwDMDocument19)ĭim vNames As Variant Dim vTypes As Variant Dim vLinkedTo As Variant Dim vValues As VariantĭmDoc.GetAllCustomPropertyNamesAndValues vNames, vTypes, vLinkedTo, vValues PrintConfigurationSpecificProperties swDmDoc Set swDmDoc = OpenDocument(FILE_PATH, True) If Not swDmClassFactory Is Nothing Then Set swDmApp = swDmClassFactory.GetApplication(SW_DM_KEY)ĭim swDmDoc As SwDocumentMgr.SwDMDocument19 Set swDmClassFactory = CreateObject( "SwDocumentMgr.SwDMClassFactory")
#VBA TO READ FILE DETAILS LICENSE#
Please share this with your friends and share your feedback, views in below comment box.Looking forward to see you again.Const SW_DM_KEY As String = "Your license key" Const FILE_PATH As String = "C:\SampleModel.SLDPRT" Dim swDmClassFactory As SwDocumentMgr.swDmClassFactoryĭim swDmApp As SwDocumentMgr.SwDMApplication We hope that you loved this article and tool.To clear the data, click on ‘Clear Data’.Done, you will get all the files available in the folder along with file properties.Save the following attachment in your system File Properties Tool.Sheet1.Cells(iCurRow, 8).Value = objFile.Type Sheet1.Cells(iCurRow, 6).Value = objFile.DateLastModified Sheet1.Cells(iCurRow, 5).Value = objFile.DateLastAccessed Sheet1.Cells(iCurRow, 4).Value = objFile.DateCreated Sheet1.Cells(iCurRow, 3).Value = objFile.Name Set objFS = CreateObject("Scripting.FileSystemObject")ĭo While vFile "" 'LOOP until all files in folder strPath have been looped through VFile = Dir(strPath & "*.*") 'Change or add formats to get specific file types If Right(strPath, 1) "/" And Right(strPath, 1) "\" Then 'gets the properties of each file and displays them on the sheet 'This function loops through all the files in the folder and You just need to browse the folder where your files are and click on ‘Get File Properties’ button File Properties Tool is an Excel VBA tool which gets the following properties of the file. Here is one more interesting VBA tool from ExcelSirJi team.
