rocknrol
Mechanical
- Feb 1, 2004
- 21
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