Reading File Custom Properties in VB.net
Reading File Custom Properties in VB.net
(OP)
I posted this on the Solid Edge cad forum as I am having a problem with a program that edits custom file properties in Solid Edge drawing files, but haven't got an answer yet.
I am able to do all the reading and writing OK but if the property does not exist my program crashes.
I want to add in some code to check that the custom property exists and, if it doesn't, give the user the opportunity to add it.
Any ideas?
I am able to do all the reading and writing OK but if the property does not exist my program crashes.
I want to add in some code to check that the custom property exists and, if it doesn't, give the user the opportunity to add it.
Any ideas?
bc.
2.4GHz Core2 Quad, 4GB RAM,
Quadro FX4600.
Where would we be without sat-nav?





RE: Reading File Custom Properties in VB.net
Example:
With seApp.ActiveDocument.Properties
For i = 1 To .Item("Custom").Count
If .Item("Custom").Item(i).Name = "MyCustomProp" Then
MsgBox "Found it!"
End If
Next
End With
In this case, the name property is case sensitive.
Hope this helps
RE: Reading File Custom Properties in VB.net
I could use an array for the property name strings and check each custom property against that, and if the value isn't found then let the user add it.
bc.
2.4GHz Core2 Quad, 4GB RAM,
Quadro FX4600.
Where would we be without sat-nav?