Workgroup PDM - How to get properties from configurations?

Hello,

i am trying to write a Macro to read all properties from documents in the vault.

With the document properties it is no problem:

allDocs = Connection.Documents

For i As Integer = 0 To allDocs.Count - 1

doc = allDocs(i)

    For i2 As Integer = 0 To doc.Properties.Count - 1

    MsgBox(doc.Properties(i2).name & vbLf & _

           doc.Properties(i2).value

   Next

Next

But how can i get the properties, that are in the Configurations?

regards,

Sascha

SolidworksApi macros
Answers 2
WM
WM 2011-03-09 Best Answer

From your IPDMWDocument object, you get your collection of configurations.

Dim configurations as PDMConfigurations

configurations = doc.Configurations

Next iterate through the the configurations

Dim configuration as IPDMConfiguration

For each configuration in configurations

    For i2 As Integer = 0 To configuration.Properties.Count - 1

         MsgBox(configuration.Properties(i2).name & vbLf & _

           configuration.Properties(i2).value

   Next

Next

SS
SS 2011-03-09

Hello,

Many thanks for the quick help!

This works wonderfully!

Regards

Sascha