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?
Solved! Go to Solution.
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?
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.
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.
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.
Then why not a complete VB solution?
Something to think about fo the future...
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled