Reply

Changing Author in the File Properties

[ Edited ]

 

I have this problem. I need to change the Author in the File Properties with out opening the actual Solid Edge file, so I save the time to open, check out , close and check in. The Code I came up runs with no errors but it does not chanhe the author as I need. The files I'm  trying  to change the author are in a insight server, they are not in a local hard drive.

 

I open the file properties from the local cache since if I try to open it directly from the http:// location it will not open the file properties

 

any help fpr what I need  to do. This is my code in VB.net

 

Thanks

Sergio

 

 

'try to chage the Author

Try

 

 

Dim TempName AsString 'File Name to be changed

Dim MyNewAuthor as String 'New Author Name

Dim AobjPropSets As SolidEdgeFileProperties.PropertySets = Nothing

Dim AobjProps As SolidEdgeFileProperties.Properties = Nothing

Dim AobjPrty As SolidEdgeFileProperties.Property = Nothing

 

AobjPropSets = CreateObject("SolidEdge.FileProperties")

AobjPropSets.Open(TempName)

AobjProps = AobjPropSets.Item("SummaryInformation")

AobjPrty = AobjProps.Item("Author")

AobjPrty.Value = MyNewAuthor

Debug.Print(AobjPrty.Value)

AobjProps.Save()

AobjPropSets.Save()

AobjPropSets.Close()

'' Release com objects.

 

IfNot (AobjPropSets IsNothing) Then

Marshal.ReleaseComObject(AobjPropSets)

AobjPropSets = Nothing

EndIf

IfNot (AobjProps IsNothing) Then

Marshal.ReleaseComObject(AobjProps)

AobjProps = Nothing

EndIf

IfNot (AobjPrty IsNothing) Then

Marshal.ReleaseComObject(AobjPrty)

AobjPrty = Nothing

EndIf

Catch ex AsException

EndTry

 

 

 

 

 

Posted by: Sergio Vallejo
Post date: 11/4/2011 10:06:18 AM

1 REPLY

RE: Changing Author in the File Properties

[ Edited ]

Hi Sergio,

 

you could give the RevisionManager object a try to manipulate the Author property. Either directly on the Solid Edge document or via the integrated Insight API.

 

 

Posted by: Wolfgang Kunert
Post date: 11/6/2011 8:48:27 PM