Reply
Solved! Go to solution

ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

Hello,

 

I'm trying to get/set the "Comments" or "Notes" field, PropertySet=DocumentSummaryInformation, PSM mode.

When the value was set from Solid Edge Properties directly - it is being shown on the view:

SEPROP.jpg

, but SESpy shows always an empty value:

SESPY.jpg

 

When I'm trying to set this value programaticaly - the method I called runs successfully, but the value stays as it was before.

Any other property value from this PropertySet is being updated successfully.

 

Our polish attribute "Uwagi"  = Comments or Notes in English.

 

 

12 REPLIES

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

did you call  objprops.Save() after setting the Props?

 

 

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

Yes. Also when i set this value manually, with manual save of whole model, the value in SeSpy stays empty.

 

There's one more weird thing - the type referenced of "comments" field is "8", which means, that it is not a System.String, referenced as "31" -> but what type is this "8"? 

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

[ Edited ]

Be advised tht SESpy must be refreshed to re-read changes in SE after SE Spy was launched...

   7-26-2017 9-25-16 AM.png

 

Looks like Type 8 is simply a constant "Constant igDocSumInfoNotes = 8"

7-26-2017 9-36-32 AM.png

this is a text field... and is working for me... 

 

if you close the SE Prop window and update via SE Spy...  then re open then the SE Props you will see it written...

 

Inversily,  you can do the same from SE to Spy  but the Props window must close to for the Props.save it appears...

 

HTH

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6
Solution
Solution
Accepted by topic author OggiePL
3 weeks ago

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

[ Edited ]

@OggiePL  See if this helps at all...

 

'Properties

Dim objpropsets As SolidEdgeFramework.PropertySets

Dim objprops As SolidEdgeFramework.Properties

Dim objprop As SolidEdgeFramework.Property

 

'direct method:

objpropsets.Item("summaryinformation").Item("Comments").Value = "input desired text here"

 

'Looping Method:

For Each objProps In objPropsets 'checks thru all property tabs

If objProps.Name = "projectinformation" Then

For Each Me.objProp In objProps 'checks thru project property tab

If objProp.Name = "Comments" Then

objProp.Value = "input desired text here"

 

 

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

Random thought. Do you by chance have 2 Edge.exe processes running? I've seen many times where a developer will automate Solid Edge and not terminate the process. They will then open Solid Edge manually. This second instance will not be recognized by Spy rather it will be connected to the 1st instance.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

[ Edited ]

Matt, thank you for your answer!

The below given code works for EVERY field, but not for our "Uwagi" (Comments:

        static void Main(string[] args)
        {
            var seapp = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
            var doc = (SolidEdgeFramework.SolidEdgeDocument)seapp.ActiveDocument;
            SolidEdgeFramework.PropertySets objpropsets = doc.Properties;
            Console.WriteLine("Uwagi: " + objpropsets.Item("DocumentSummaryInformation").Item("Uwagi").get_Value());
            objpropsets.Item("DocumentSummaryInformation").Item("Uwagi").set_Value("jakis value");
            objpropsets.Save();

            Console.ReadKey();
        }

Any other field used in this code sets correct.

For uwagi throws:

 

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Additional information: Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

 

Other models have the same problem. I've talked with guys from Siemens PLM in Poland - they had the same problem in one of their customers - the field "Uwagi" was unable to set value with Teamcenter integration. They made it with a custom variable named "Uwag.".

 

Is that possible, that there's a problem with polish translation or something? The "Uwagi" field in ST10 is named "Komentarze" - in direct translation simply "Comments". ST9 and before ST9 it was "Uwagi".

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

Thanks for your reply Jason.

I've only one instance of Solid Edge. Instance was refreshed after every "save" in model.

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

"Teamcenter integration"

 

Not sure how or if this might be affected based on Atrtribute mappings???

 

Have you attemped on an unmanaged part off your local C: drive just for testing and verification...

 

I'm afraid I'm out of guesses...  

 

Hope some others might be able to assit.  ( @Tushar ? )

 

 

 

 

===================================================
Matt Johnson
Solid Edge Certified Professional (ST7 & ST8)
Solid Edge ST9 (SEEC) - Production
NX10 (Tc Integration) Pre-Production Testing
Teamcenter 10.1.6

Re: ST9 - get/set for "Comments/Notes" in DocumentSummaryInformation not implemented?

Matt,

 

i've got a workaround solution.

 

There are 2 similiar properties:

1. "Komentarze" in SummaryInformation

2. "Uwagi" in DocumentSummaryInformation

 

What I need has been currently done with "Komentarze".

I think it has been resolved with ST10 - field label is now named as "Komentarze".

 

The second one ("Uwagi") is reported in GTAC.

 

Teamcenter Integration in this case means, that some addins was also unable to set that value programmatically in solid edge. The field "Uwagi" was marked as mandatory in TC. Finally - it was resolved with "Uwag.", also with dot at the end of fieldname.