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

Opening Posted Output using another Editor

I've read the previous threads regarding the Tcl commands needed to open a post file in another editor (e.g. CIMCO) once posting is complete.  Those threads are a bit old and are closed for no reply, so I'm raising a followup question here.  I've been able to successfully replicate this functionality using the command:

 

exec {C:/CIMCO/CIMCOEdit6/CIMCOEdit.exe} $mom_output_file_full_name

 

with one annoying issue.  When the "exec" command is fired it causes NX to suspend until the editor (and file) are closed out.  Only then is control returned to NX.  This was noted in the old threads as a possible issue with Dual Core processors.  Is there a fix for this now?  Please advise.

 

I'm hoping there's a way to make this work cleanly.

 

Thanks!

David

9 REPLIES
Solution
Solution
Accepted by topic author David_Ellison
‎08-26-2015 04:32 AM

Re: Opening Posted Output using another Editor

I think you need to add the trailing "&" is VERY important to not BLOCK the NX thread

 

exec {C:/CIMCO/CIMCOEdit6/CIMCOEdit.exe} $mom_output_file_full_name  "&"

Frank Bartucci
NX CAM COE

Re: Opening Posted Output using another Editor

Suuweet!  That worked!  Thanks for the quick reply!

 

-David

Re: Opening Posted Output using another Editor

Hello!

 

Excuse me this question: Were do you write this exec-command?

 

Werner

Re: Opening Posted Output using another Editor

Werner,

 

You can add it to last custom command at the very end of the post sequence (or create a custom command with this statement and add it as the last command).  So it would be called within the "End of Program" group found within the "Program End Sequence" step of PostBuilder.

 

 

-David 

Re: Opening Posted Output using another Editor

Note (before opening it in an editor, or doing anything else with the file) you should close the output file:

MOM_close_output_file $mom_output_file_full_name

 

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: Opening Posted Output using another Editor

Does this mean that it would have to be added to every single PostProcessor?
Organization, an essential part of Productivity !

Production: NX10.0.3 MP13, VERICUT 8.0
Development: VB.NET, Tcl/Tk Testing: NX11.0, iMachining 2.0, Adaptive Roughing

Re: Opening Posted Output using another Editor

Yes. 

Although if you understand the tcl "source" command, you only need to write the code once, then "source" it into every post.  (Note PB includes the ability to "source" in an external tcl file, which can then "source" in the common file).

 

Then, in one post, create the "PB_CMD_whatever" to call the external proc.

This can then be saved ("Export") into a tcl file, that (in other posts) can then be imported.

 

So (after the first post) all you need to do is:

- source the user tcl file

- import the custom command

- add the custom command to the "end of program" event (presumably at the very end).

 

Note: If you have sync manager in use for multi-turret machines, you need a bit of logic to only pop up the editor when posting from sync manager.

 

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: Opening Posted Output using another Editor

[ Edited ]

if you are novice like me and TLC is foreign language 

this worked for me 

first create custom command and paste this:

 

global mom_output_file_full_name
MOM_close_output_file $mom_output_file_full_name
exec {C:/CIMCO/CIMCOEdit7/CIMCOEdit.exe} $mom_output_file_full_name "&"

 

I am not sure if the second line is needed but after couple errors I put it in and no more errors

rename custom command to whatever mine is CIMCO and picture is 1000 words

 

Untitled.jpg

Re: Opening Posted Output using another Editor

The second line is mandatory, else you get a race condition between the editor and the PP.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community

Learn online





Solution Information