Issue updating property values of SE files

 

I am trying to use the "Number of pages" and "Security" properties in the Summary Information Property set.  These are both properties that are "not maintained" according to the programmers guide.  The first time through my program I am able to set or read the .value method of the property.  However on subsequent iterations on the same file I get "method 'value' of object 'property' failed".   I am also having weird behavior afterwards where the file is getting locked until I close it.

SE Spy also doesn't even show the value property when I select the property, leave it and come back.

Here is my code in VB6:

Dim objApp As SolidEdgeFramework.Application

Dim objDraftdoc As SolidEdgeDraft.DraftDocument

Dim oProp      As Object

Dim oSummaryInfoProps As Object

Dim oStampExistedProperty As Object

Dim oStampAlteredProperty As Object

Set objApp = GetObject(, "SolidEdge.Application"

Set objDraftdoc = objApp.ActiveDocument

'Initialize the PropertySets collection object.

Set oProp = objDraftdoc.Properties

'Access the SummaryInformation properties collection

Set oSummaryInfoProps = oProp("SummaryInformation"

'Retrieve & set the properties.

Set oStampExistedProperty = oSummaryInfoProps("Number of pages"

Set oStampAlteredProperty = oSummaryInfoProps("Security"

oStampExistedProperty.Value = "1"

oStampAlteredProperty.Value = "0"

oProp.Save

Set oSummaryInfoProps = Nothing

Set oStampExistedProperty = Nothing

Set oStampAlteredProperty = Nothing

Set oProp = Nothing

set objDraftdoc = Nothing

set objApp = Nothing

 

Posted by: Carl Breving
Post date: 8/9/2007 10:58:52 AM

4 REPLIES

RE: Issue updating property values of SE files

 

Carl,

I believe the mistake that you are making is changing the Security property.  I'm not sure where you read that is wasn't maintained by Solid Edge but it is indeed maintained.  Specifically, depending on what Status the file is at, the Security property will have a specfic value.  Changing this value manually could cause Solid Edge to think that the file is, say, Released and not to be changed.

HTH, let me know if it doesn't.

 

Posted by: Jason Newell
Post date: 8/9/2007 12:21:18 PM

RE: Issue updating property values of SE files

 

Jason.

I still get the same issue if I do not use Security or if I use any other "not maintained" property.

I have also attached the page from the programers guide where is says some of the properties are not maintained.

 

Posted by: Carl Breving
Post date: 8/10/2007 4:06:03 AM

RE: Issue updating property values of SE files

 

I think I solved my issue.  The data type for these is integer and I was putting a string.  as soon as I change them to integers it started working.

 

Posted by: Carl Breving
Post date: 8/10/2007 4:26:46 AM

RE: Issue updating property values of SE files

 

Carl,

Glad you figured it out.  It is my strong opinion that the documentation that you listed is wrong, specifically about the security property.  I know for a fact that it is controlled and used by Solid Edge.  Attempting to use it for any type of customization would be a mistake and will cause you problems.

Jason

 

Posted by: Jason Newell
Post date: 8/10/2007 7:09:44 AM