Extraction of All Properties of a part Document-->>Errors; Help!!

[ Edited ]



   I have beebn trying to extract all the properties of a part Document.

  But I am not getting all the Properties from the file. Even though the values in the Properties of the documents are set. I have checkd the values By File properties command in Solid Edge.

This is my COde

Public Const PROJECT_INFORMATION = "ProjectInformation"
Public Const DOC_NUMBER = "Document Number"
Public Const DOC_REVISION = "Revision"
Public Const SUMMARY_INFORMATION = "SummaryInformation"
Public Const DOC_CREATION_DATE = "Creation date"
Public Const DOC_TITLE = "Title"
Public Const EXTENDED_SUMMARY_INFORMATION = "Extended Summary Information"
Public Const DOCUMENT_SUMMARY_INFORMATION = "Document Summary Information"
Public Const VERSION_HISTORY = "Version History"
Public Const CUSTOM = "Custom"
Public Const DOC_AUTHOR = "Author"
Public Const DOC_KEYWORDS = "Keywords"
Public Const DOC_COMPANY = "Company"
Public Const DOC_COMMENTS = "Comments"
Public Const DOC_TEMPLATE = "Template"
Public Const DOC_LAST_AUTHOR = "Last Author"
Public Const DOC_NAME_OF_SAVING_APPLICATION = "Name Of Saving Application"
Public Const DOC_CATAGORY = "Catagory"
Public Const DOC_STATUS = "Status"
Public Const DOC_MANAGER = "Manager"
Public Const DOC_PROJECT_NAME = "Project Name"

' Node type information
Type typeNode
    strDocName As String
    strOccurrenceName As String
    strDocNumber As String
    strDocRevision As String
    strDocCreationDate As String
    strDocTitle As String
    strAuthor As String
    strKeyword As String
    strComments As String
    strTemplates As String
    strLastAuthor As String
    strSavingApplication As String
    strStatus As String
    strCatagory As String
    strManager As String
    strCompany As String
    strRevision As String
    strProjectName As String
    objDocument As Object ' This might be a SolidEdgeAssembly.AssemblyDocument or SolidEdgePart.PartDocument or SolidEdgePart.SheetMetalDocument, so we use late binding here
    intLevel As Integer
    intCount As Integer
End Type

' Store the elements found in the assembly.
Public gusrNodeArray() As typeNode
Sub UpdateNodeArray(objOccurrence As SolidEdgeAssembly.Occurrence, intLevel As Integer)
 Dim intX As Integer
    Dim strFileName As String
    Dim bMissingDocument As Boolean
    strFileName = UCase(objOccurrence.OccurrenceFileName)
 gintNodeCount = intX
    ' Now store the information in the new node.
    With gusrNodeArray(intX)
        .strDocName = strFileName
        .strOccurrenceName = objOccurrence.Name
        On Error Resume Next
        bMissingDocument = True
        bMissingDocument = objOccurrence.OccurrenceDocument Is Nothing
        If Not bMissingDocument Then
            Set .objDocument = objOccurrence.OccurrenceDocument
            .strDocNumber = Str(.objDocument.Properties(PROJECT_INFORMATION).Item(DOC_NUMBER).Value)
            .strDocRevision = .objDocument.Properties(PROJECT_INFORMATION).Item(DOC_REVISION).Value
''090521 pROBLEM. uNKNOWN "Subscript Out of Range"
            .strDocCreationDate = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_CREATION_DATE).Value
            .strDocTitle = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_TITLE).Value
            .strAuthor = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_AUTHOR).Vl
            .strKeyword = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_KEYWORDS).Value
            .strComments = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_COMMENTS).Value
            .strTemplates = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_TEMPLATE).Value
            .strLastAuthor = .objDocument.Properties(SUMMARY_INFORMATION).Item(DOC_LAST_AUTHOR).Value
            .strSavingApplication = .objDocument.Properties(EXTENDED_SUMMARY_INFORMATION). _
            .strStatus = .objDocument.Properties(EXTENDED_SUMMARY_INFORMATION). _
            .strCatagory = .objDocument.Properties(DOCUMENT_SUMMARY_INFORMATION). _
            .strManager = .objDocument.Properties(DOCUMENT_SUMMARY_INFORMATION). _
            .strCompany = .objDocument.Properties(DOCUMENT_SUMMARY_INFORMATION). _
        Else 'The document referenced by the assembly structure is missing; what should we do?
            'set default string values
            .strDocNumber = "Not available"
            .strDocRevision = "Not available"
            .strDocCreationDate = "Not available"
            .strDocTitle = "Not available"
        End If
        .intLevel = intLevel
        .intCount = 1
    End With
End Sub


I am getting the values for most of the properties..

please help bye



Posted by: Pritam Dulam
Post date: 6/26/2009 8:34:04 PM


RE: Extraction of All Properties of a part Document-->>Errors; Help!!

[ Edited ]




please take a look at.

I think this can help you, thanks to Calum.




Posted by: Massimo Magris
Post date: 6/30/2009 11:51:45 AM