Reply

Adding Summary Information using VB6

[ Edited ]

 

I am trying to add some Summary information to a Solid Edge 3D part using VB6. I can add Author, Keywords and Comments but when I tey to add Company details I get a subscript out of range error in VB. This is part of the code:-

Set SE = GetObject(, "SolidEdge.Application")

Set Doc = SE.ActiveDocument

Set objProperties = Doc.Properties

objProperties.Item("SummaryInformation")("Company").Value = "XX"

objProperties.Item("SummaryInformation")("Comments").Value = "XX"

Comments appear OK but Company doesn't (same if I use "Manager")

 

 

Posted by: Paul Collins
Post date: 7/28/2008 10:39:32 PM

6 REPLIES

RE: Adding Summary Information using VB6

[ Edited ]

 

Hi Paul,

 

Manager and Company are in the DocumentSummaryInformation property set (see here: http://msdn.microsoft.com/en-us/library/aa380374(VS.85).aspx)

 

Calum

 

Posted by: Calum McLellan
Post date: 7/30/2008 9:43:58 AM

RE: Adding Summary Information using VB6

[ Edited ]

 

Calum

Thanks for the info. I think my basic syntax is correct but for some reason Solid Edge will not accept it.

Regards

Paul

 

 

Posted by: Paul Collins
Post date: 8/3/2008 11:26:58 PM

RE: Adding Summary Information using VB6

[ Edited ]

 

Calum

I'v just realised where I was going wrong (it's Monday morning !). I was using SummaryInformation not DocumentSummaryInformation. Works fine now. Thanks again.

 

Paul

 

Posted by: Paul Collins
Post date: 8/4/2008 12:27:31 AM

RE: Adding Summary Information using VB6

[ Edited ]

 

no worries

 

Posted by: Calum McLellan
Post date: 8/4/2008 1:34:57 AM

Re: RE: Adding Summary Information using VB6

Hi, everybody...

 

I try for few day`s find a way to modify in DFT file propertis CATEGORY.

 

objDocument = objApp.ActiveDocument
objPropertySets = objDocument.Properties

objProperty = objPropertySets.Item("DocumentSummaryInformation")
objProperty.Category = "aaaa"
objPropertySets.Save()

 

I read about SummaryInfo, but i couldn`t find a example how do that.

Re: RE: Adding Summary Information using VB6

i try this and it`s working

 

Imports System.Runtime.InteropServices

Module Module1
    Dim objApplication As SolidEdgeFramework.Application = Nothing
    Dim objDocument As SolidEdgeFramework.SolidEdgeDocument = Nothing
    Dim objPropertySets As SolidEdgeFramework.PropertySets = Nothing
    Dim objProperties As SolidEdgeFramework.Properties = Nothing
    Dim objProperty As SolidEdgeFramework.Property = Nothing
    Sub Main()

        objApplication = Marshal.GetActiveObject("SolidEdge.Application")
        objDocument = objApplication.ActiveDocument
        objPropertySets = objDocument.Properties
        objPropertySets = objDocument.Properties
        objProperties = objPropertySets.Item("documentSummaryInformation")
        objProperty = objProperties.Item("Category")
        objProperty.Value = "RELEASED 20-08-2014"
        objProperties.Save()
        objDocument.Save()


    End Sub

End Module