cancel
Showing results for 
Search instead for 
Did you mean: 

Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Creator
Creator

Does anyone know how to record your mouse clicks on operations or files to get a script produced from the series of clicks.  The script could then be reused as needed?

7 REPLIES

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Have you looked at journaling? This records the result of your mouse clicks, so it is much more stable going forward. By default it writes a .vb program. You can then edit this program, and build something more flexible and powerful.

There are also keystroke macros, which directly record your selections in the UI, but I would not invest in these for than a basic record/playback of a few clicks.

If you are really looking for mouse clicks - as in tracking the screen location and time of each click, then I would look in to usability testing tools. 

Mark Rief
Retired Siemens

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Creator
Creator

Thanks Mark.  I will use the journaling.

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Creator
Creator

So I am using the Journal tool to send a .cls file to a folder without having to click more than once.  That works great.  Very nifty.  The next thing I want to do is grab that .cls that was output to my file folder and do some stuff to it outside of NX Cam.    I just want to copy it into an old school processor and execute it as per my mouse clicks. Do I have to use an unrelated macro for that or is there an easy way to do that within the journal?

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks


P_Schell wrote:

So I am using the Journal tool to send a .cls file to a folder without having to click more than once.  That works great.  Very nifty.  The next thing I want to do is grab that .cls that was output to my file folder and do some stuff to it outside of NX Cam.    I just want to copy it into an old school processor and execute it as per my mouse clicks. Do I have to use an unrelated macro for that or is there an easy way to do that within the journal?


You are not limited to the NX API - you can run regular vb commands. Attached is a program I did to read and write a text file - you can get an idea about the file IO. I'm sure you can execute windows commands. I would ask in the Programming and Customization Forum,  search the GTAC solution center or the web for some vb samples that do what you want, or ask around for somebody who knows vb - That's what I do :*) 

Mark Rief
Retired Siemens

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

It's very easy to start an executable outside of NX, through a journal using the Shell command.

Sample:

If My.Computer.FileSystem.GetDirectoryInfo("C:\Program Files\ICAM V22").Exists = True Then
  ID = Shell("""C:\Program Files\ICAM V22\GENER.exe""" & " " & sNCFileName)
End If

The trick is to find out how many double quotes and were to put them.

 

 

Another option is to use the system diagnostics process command

System.Diagnostics.Process.Start("C:\Windows\notepad.exe")

I don't think you can specify additional parameter with this command

 

Patrick Delisse
KMWE - DutchAero
NX11.0, CAMPOST V22, Vericut 8.1

Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Esteemed Contributor
Esteemed Contributor

The other option is to have the "CLSF output" (or post) tcl code execute the program.

(note for your case it would also have to do the file copy as well)

 

All depends on what language you prefer to use ;-)

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


Re: Producing CAM scripts for Unigraphics NX10 by tracking mouse clicks

Creator
Creator
Thanks Mark.

Learn online





Solution Information