---------------
Report Custom File Property Value
Note: Create file property with name in 'GTAC' in part or draft file.
Select application button > Info > File Properties > Custom tab >
Name : GTAC
Type : Text/Date/Number/Yes or No
Value: gtac/8/10/2017/123/Yes
> then select Add button > click OK on property dialog.
Solution
Imports System.IO
Imports System.Runtime.InteropServices
Imports SolidEdge.Constant.Interop
Module ReportCustomFilePropertyValue
Sub Main()
Dim objSEApplication As SolidEdge.Framework.Interop.Application =
Nothing
Dim objPropertySets As SolidEdge.Framework.Interop.PropertySets =
Nothing
Dim objProperties As SolidEdge.Framework.Interop.Properties = Nothing
Dim objProperty As SolidEdge.Framework.Interop.Property = Nothing
Dim objSEDoc As SolidEdge.Framework.Interop.SolidEdgeDocument = Nothing
objSEApplication = Marshal.GetActiveObject("SolidEdge.Application")
objSEDoc = objSEApplication.ActiveDocument
objPropertySets = objSEDoc.Properties
For Each objProperties In objPropertySets
For Each objProperty In objProperties
If (objProperty.Name = "GTAC") Then
MsgBox("GTAC File Property Value = " +
objProperty.Value.ToString())
End If
Next
Next
End Sub
End Module
Notes and References
Hardware/Software Configuration
Platform: AMD64
OS: window
OS Version: 764
Product: SOLID_EDGE
Application: AUTOMATION
Version: V109MP5
Function: API_DOCUMENT
Product: SOLID_EDGE
Application: AUTOMATION
Version: V109MP5
Function: API_DOCUMENT
Ref: 002-7009759