Extract Workgroup PDM Documents
PDMWProject.Documents
At this point, this method saves every document in Workgroup
PDM to the directory entered in the TextBox control. This does
not make an extremely useful utility unless you simply want to
extract all of the latest documents out of the vault. The next
addition to the macro will be to extract only documents from the
selected project. The Documents property of the IPDMWProject
interface will access the IPDMWDocuments collection from only
that project. If no project is selected, assume the user wishes to
extract from all projects.
13. Modify the ExtractButton_Click procedure as follows. If
the SelectedItem property of the ListBox control is and
empty string then nothing is selected. That means all
documents should be used. Otherwise, you will get the
IPDMWDocuments collection from the IPDMWProject
interface related to the project name selected.
Private Sub cm:
Dim MyDocs
If ProjectList .SelectedItem
1 documents in the vault
conn.Documents
Else
‘get only the documents from
'the selected project
Dim MyProjects As PDMWProjects = conn.Projects
Dim MyProject As PDMWProject = _
MyProjects .Item(ProjectList . SelectedItem)
MyDocs = MyProject .Documents
End If
"save each document
h MyDoc In MyDoc
ave txtExportDir.Text
For Eac
MyD
Next MyDoc
End Sub
303