cancel
Showing results for 
Search instead for 
Did you mean: 

Error on journal with NX10

Legend
Legend

Hi,

this journal works fine on NX8, but on NX10 give an error on line 271.

Attached the journal and the image.error.png

I would like in this journal add in others columns some our custom attribute.

 

Thank you...

Using NX 11 / RuleDesigner PDM

6 REPLIES

Re: Error on journal with NX10

Legend
Legend

The "GetStringAttribute" methods need to be replaced with "GetUserAttribute" method.

 

The documentation shows

 

("Deprecated in NX8.0.0.  Use GetUserAttribute instead.")

 

Regards

 

Frank Swinkels

 

 

Re: Error on journal with NX10

Legend
Legend

FrankSwinks wrote:

The "GetStringAttribute" methods need to be replaced with "GetUserAttribute" method.

 

The documentation shows

 

("Deprecated in NX8.0.0.  Use GetUserAttribute instead.")

 

Regards

 

Frank Swinkels

 

 


Error GetUserAttribute.png

Doesn't work.

Thank you...

Using NX 11 / RuleDesigner PDM

Re: Error on journal with NX10

Esteemed Contributor
Esteemed Contributor

You can't just replace the name of the method, you need to change the arguments to match the definition of the method too.

 

A good code editor has a hint and code completion feature, so you should use one.

The journal editor inside of NX is not really useable for such things, but meant for quick changes, like correcting spelling errors in displayed text.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Re: Error on journal with NX10

Legend
Legend
Ok,
I'm not a programmer, I've found this journal very interesting what works on NX8, but not on NX10.
I use thsi forum to found some expert that can resolve the problem.
Thank you...

Using NX 11 / RuleDesigner PDM

Re: Error on journal with NX10

Siemens Phenom Siemens Phenom
Siemens Phenom

I downloaded the journal from the original post and it ran successfully for me on a simple assembly in both NX 8 and NX 10.

 

The error message in the original image flags line 271 as the problem. That line of code is:

 

      If objWorksheet.Cells(intTopRow, colBranchCreated).Value <> 1 Then

 

This line contains nothing from the NX Open api. It is using .NET Excel methods. Are you running NX 8 and NX 10 on the same machine? if not, the machine you are running NX 10 on may not have .NET 4.5 installed on it.

 

Note that you do NOT have to replace the "GetStringAttribute" method with the "GetUserAttribute" method. When a method is marked as deprecated, it means that a newer method may be available or it may be removed in a future release. The GetStringAttribute method is still in the API and should still function as it always has.

Re: Error on journal with NX10

Legend
Legend

I've reinstalled .NET 4.5 and now works fine.

Thank you...

Using NX 11 / RuleDesigner PDM