Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Memory access violation

[ Edited ]

I'm running a batch python script which accesses NX parts in a background mode, then uses a .vb file which applies KF rules to pull attribute values from those parts.

In the middle of rules application to the initial part I get this message:

''NXOpen.NXException: Internal error: memory access violation''

Is this related to hardware insufficiency because if I run the same script manually inside NX Journaling I get no errors?

5 REPLIES

Re: Memory access violation

When running in batch mode, your code will need to make sure that there is a part file open to act on.

 

"I'm running a batch python script which accesses NX parts in a background mode, then uses a .vb file which applies KF rules to pull attribute values from those parts."

 

That sounds a bit convoluted. Why not pull attribute values from the parts with the Python code and eliminate the .vb and KF stuff?

Re: Memory access violation

[ Edited ]

The phython still has to apply KF to establish the desired attributes in a part, then pull and store their values in excel. Afterwards move on to the next part iteration and loop through the rest.
VB seemed to be easier to handle excel related things.

Re: Memory access violation

It is possible to assign part attributes with python or vb alone (no need for KF to assign a part attribute). Perhaps you need KF for other reasons in your code, but please be aware that it is not required to assign a part or object attribute.

Solution
Solution
Accepted by topic author Periklis
‎10-04-2016 11:21 AM

Re: Memory access violation

My problem was related to incorrectly set paths in the journal bat file. Now it's up and running. I do agree on a more elegant single pythone code solution but for me it would be too much hassle as I'm not that savvy with it.

Re: Memory access violation

Then why not a complete VB solution?

Something to think about fo the future...

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled