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

Search within files for a tool without opening the files

Hello all,

I am new to NX and was asked to try and make a spreadsheet in which you can type a Tool number and all .prt files containing that tool within a particular file location will be listed. We utilize NX 7.5 and 9 until we can convert everything to 9. I was thinking of tying to add a button in excel that will contain code that will search the files while using a cell (containing the tool number) as the search criteria. Any assistance on this will be greatly appreciated.

Thank you

13 REPLIES
Solution
Solution
Accepted by MarkRief (VIP)
‎08-26-2015 04:32 AM

Re: Search within files for a tool without opening the files

A sample vb program was provided in the Manufacturing forum :*)

 

http://community.plm.automation.siemens.com/t5/Discussion-Forum-NX/Search-within-files-for-a-tool-wi...

 

Mark Rief
Retired Siemens

Re: Search within files for a tool without opening the files

thank you again

Re: Search within files for a tool without opening the files


jfree wrote:

thank you again


You're very welcome.

I put the note here so that folks in this forum know that this has been solved. Many programmers don't read the CAM forum.

Mark Rief
Retired Siemens

Re: Search within files for a tool without opening the files

MarkRief,

Hello again, I have added a few things to the code and I was wondering if there is any way to make this an executable file so that I can run it without opening NX.  My idea is to have a Refresh button in excel that will update the tool numbers by running the code. Any help is greatly appreciated. 

Thank you,

Re: Search within files for a tool without opening the files

You can run the journal from a command line. Start an NX Command Prompt window and enter run_journal -help.

Mark Rief
Retired Siemens

Re: Search within files for a tool without opening the files

Thank you again MardRief that helped very much. I was just asked to do the same thing as it is doing now but to only pull tool numbers that have operations attached to them. I have tried searching for them but have had no luck. Do you have any ideas? Thanks you

Re: Search within files for a tool without opening the files


jfree wrote:

Thank you again MarkRief that helped very much. I was just asked to do the same thing as it is doing now but to only pull tool numbers that have operations attached to them. I have tried searching for them but have had no luck. Do you have any ideas? Thanks you


You want to check if a tool has children in the tool view, but I don't know how to do that.

 

Another idea would be to cycle the operations, and ask the tool number of each.

 

Mark Rief
Retired Siemens

Re: Search within files for a tool without opening the files

I Tried to do that and just changed to
theUfSession.Setup.AskProgramRoot(setupTag, RootTag)

When I run the journal it does not give any errors but it also does not return any tool numbers. any ideas?
Solution
Solution
Accepted by topic author jfree
‎08-26-2015 04:32 AM

Re: Search within files for a tool without opening the files

Here is a sample that cycles through all the operations in the Tool view, and returns the tool parent name and reference tool name of each.

 

This should provide only those tools in the part that are being used by an operation.

Mark Rief
Retired Siemens