×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SE & VB How i can save properties

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:

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
Please help me?

RE: SE & VB How i can save properties

It looks ok to me apart from I have specified custom.

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources