cancel
Showing results for 
Search instead for 
Did you mean: 

Journal for retrieving holders for multiple tools

Genius
Genius

I'm needing some help to retrieve the same holder for mutiple tools with a Journal. I have recorded a Journal while retrieving a holder and it mentioned the RetrieveHolder method but I am lost on how to use it exactly.

3 REPLIES

Re: Journal for retrieving holders for multiple tools

A common practice that I use is to record a jounal for something specific, and then adapt it to be much more general.

 

In your recorded journal, you should see something like this, which retrieves the holder for the tool you selected in journal:

success1 = CType(theUI.SelectionManager.GetSelectedObject(0), NXOpen.CAM.Tool).RetrieveHolder("HLD001_00023")

 

 

What you need to do is copy one of the samples that modifies selected tools, and adapt it to do this instead.

 

Take a look at this tech tip session  Learn to use Journal Files in NX CAM and then give it a try.

 

Mark Rief
Retired Siemens

Re: Journal for retrieving holders for multiple tools

Genius
Genius

I had seen that code in my journal that I recorded, but when I plugged it into my customized journal all it did was delete all the steps in the holder that I was trying to replace.

 

But after you confiming that this was the code that I needed, and after playing around a bit I got it figured out. I was using a builder to try to make the change. But that was wrong, no builder needed.

 

Thanks Mark!!!!

 

For anyone else that might have use of it, I have attached the code. Just change the name of the holder to what you need.  - ex. change RetrieveHolder("HLD001_00023") to  RetrieveHolder("YOUR HOLDER NAME")

 

 

Re: Journal for retrieving holders for multiple tools

Genius
Genius

Correction, it wasn't the fact that I was using a builder it was that I was using the wrong builder. I was using ToolBuilder instead of MillingToolBuilder.

 

But at the same time it does work if you don't use a builder also.