Property reading

Discussion in 'AutoCAD' started by Frank Koole, Nov 22, 2004.

  1. Frank Koole

    Frank Koole Guest

    Hi,

    I solved my problem with setting some properties in a drawing. Next thing is to read all the properties, from for example excel (drawings are all closed). I tried this, but it only works for MS Office files:

    Private Sub Doc_Props()

    Dim oFSO As Object
    Dim oFolder As Object
    Dim oFile As Object
    Dim strFileName As String
    Dim i As Integer
    Dim DSO As DSOleFile.PropertyReader

    Set DSO = New DSOleFile.PropertyReader
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFolder = oFSO.GetFolder("C:\Test")
    i = 1

    For Each oFile In oFolder.Files
    strFileName = oFile
    With DSO.GetDocumentProperties(sfilename:=strFileName)
    Blad1.Cells(i, 1).Value = .Author
    'Debug.Print .AppName
    'Debug.Print .ByteCount
    'Debug.Print .Company
    'Debug.Print .CustomProperties("Cust Prop").Value
    End With
    Next oFile

    End Sub

    As you can understand, I want to be able to do the same for Acad files. Does anyone know how?

    Frank
     
    Frank Koole, Nov 22, 2004
    #1
  2. The SummaryInfo property on the Drawing object (AutoCAD 2004/2005).

    --
    R. Robert Bell


    Hi,

    I solved my problem with setting some properties in a drawing. Next thing is
    to read all the properties, from for example excel (drawings are all
    closed). I tried this, but it only works for MS Office files:

    Private Sub Doc_Props()

    Dim oFSO As Object
    Dim oFolder As Object
    Dim oFile As Object
    Dim strFileName As String
    Dim i As Integer
    Dim DSO As DSOleFile.PropertyReader

    Set DSO = New DSOleFile.PropertyReader
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFolder = oFSO.GetFolder("C:\Test")
    i = 1

    For Each oFile In oFolder.Files
    strFileName = oFile
    With DSO.GetDocumentProperties(sfilename:=strFileName)
    Blad1.Cells(i, 1).Value = .Author
    'Debug.Print .AppName
    'Debug.Print .ByteCount
    'Debug.Print .Company
    'Debug.Print .CustomProperties("Cust Prop").Value
    End With
    Next oFile

    End Sub

    As you can understand, I want to be able to do the same for Acad files. Does
    anyone know how?

    Frank
     
    R. Robert Bell, Nov 22, 2004
    #2
  3. Frank Koole

    Frank Koole Guest

    Sorry I forgot to tell, I'm using 2000i.

    So anyone that knows how it works for 2000i?

    Thanks,
    Frank
     
    Frank Koole, Nov 23, 2004
    #3
  4. The data is stored in a dictionary prior to 2004. Search this ng for the
    name (I'm lazy).

    --
    R. Robert Bell


    Sorry I forgot to tell, I'm using 2000i.

    So anyone that knows how it works for 2000i?

    Thanks,
    Frank
     
    R. Robert Bell, Nov 23, 2004
    #4
  5. Frank Koole

    Frank Koole Guest

    Thanks Robert.

    But if I'm not wrong, the dictionary can only be accesed when Acad is running? And I want to be able to get the DWG Props, just like you would get document properties from a word document without word running.

    Does anyone know how this can be done?

    Frank
     
    Frank Koole, Nov 26, 2004
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.