SE & VB How i can save properties
SE & VB How i can save properties
(OP)
i be able read the property with VB but i can't save it.
I want save with VB the custom property
for exsample "Long" = 100.0
Can someone help me?
In solid edge SDK is not example for this.
I try it write like this:
Please help me?
I want save with VB the custom property
for exsample "Long" = 100.0
Can someone help me?
In solid edge SDK is not example for this.
I try it write like this:
CODE
Sub Main()
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgePart.PartDocument
Dim objProp As SolidEdgeFileProperties.Properties
' Report errors
Const PI = 3.14159265358979
' Create/get the application with specific settings
On Error Resume Next
objApp = GetObject(, "SolidEdge.Application")
If Err.Number Then
Err.Clear()
objApp = CreateObject("SolidEdge.Application")
objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
objApp.Visible = True
Else
objDoc = objApp.ActiveDocument
End If
' getting the properties object of the part document
objProp = objDoc.Properties
Call objProp.Add("Long", 100.0)
Call objProp.Save()
' Release objects
objApp = Nothing
objDoc = Nothing
objProp = Nothing
End Sub
Dim objApp As SolidEdgeFramework.Application
Dim objDoc As SolidEdgePart.PartDocument
Dim objProp As SolidEdgeFileProperties.Properties
' Report errors
Const PI = 3.14159265358979
' Create/get the application with specific settings
On Error Resume Next
objApp = GetObject(, "SolidEdge.Application")
If Err.Number Then
Err.Clear()
objApp = CreateObject("SolidEdge.Application")
objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
objApp.Visible = True
Else
objDoc = objApp.ActiveDocument
End If
' getting the properties object of the part document
objProp = objDoc.Properties
Call objProp.Add("Long", 100.0)
Call objProp.Save()
' Release objects
objApp = Nothing
objDoc = Nothing
objProp = Nothing
End Sub





RE: SE & VB How i can save properties
i.e.
objProp = objDoc.Properties("Custom")
I have done this for draft files so not sure if it will work in the part properties.
Hope this helps.
Craig