Cancel
Showing results for 
Search instead for 
Did you mean: 

[Post Builder[ output the sub program

Solution Partner Builder Solution Partner Builder
Solution Partner Builder

Hi

 

I want to print the sub program at the end of the main program.

 

 

sub.jpg

Currently, subprograms are output as separate files.

 

However, we want to output the following in one main program file as below.

 

program.jpg

 

 

 

Sample or advice on how to set it up.

I would appreciate any sample or advice from you on how to set it up.

4 REPLIES

Re: [Post Builder[ output the sub program

Legend
Legend

have you tried the ken's response ? your post

Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: [Post Builder[ output the sub program

Solution Partner Builder Solution Partner Builder
Solution Partner Builder

Hi mkn

 

I saw ken's advice well.

But at the end of the program, I do not know how to put the contents of the subprogram file into the main program.

Re: [Post Builder[ output the sub program

Phenom
Phenom

If subprogram is written to a temp file add something like this to the "End of Program" event

 

#=============================================================
proc PB_CMD_subprogram_append { } {
#=============================================================
    global sub_file_name
    global ptp_file_name

    if {[info exists sub_file_name]} {
        if {[file exists $sub_file_name]} {
            MOM_close_output_file $ptp_file_name
            set out [open $ptp_file_name a]
            set in [open $sub_file_name r]
            fcopy $in $out
            close $out
            close $in
            MOM_remove_file $sub_file_name
            MOM_open_output_file $ptp_file_name
        }
    }
}

Re: [Post Builder[ output the sub program

Solution Partner Builder Solution Partner Builder
Solution Partner Builder

Thank you agrivas.

 

It has been resolved.

Learn online





Solution Information