Showing results for 
Search instead for 
Do you mean 
Reply

HTML Shop Doc questions

[ Edited ]

 

1st question - Note above JPEG. What is the correct syntax in shopdoc_excel.tcl to get SETUP_part.gif to stay or go into the "_files folder"? 

I see someone thought it could be used again and put it in the output directory for that reason. They way we run things, having multple component shop docs in the same folder, this does not work.

 

"SETUP_part.gif" SYNTAX BELOW

 

set mom_setup_part_gif_file \

[Get_NativeName ${mom_output_file_directory}${mom_output_file_basename}.gif]

if { [info commands "MOM_get_image"] != "" } {

if [catch { MOM_get_image $mom_setup_part_gif_file } res] {

INFO "$res"

}

} else {

# When CAM_SETUP_part.gif exists, just use it.

set cam_setup_gif [Get_NativeName ${mom_output_file_directory}CAM_SETUP_part.gif]

if { [file exists $cam_setup_gif] } {

file rename -force $cam_setup_gif $mom_setup_part_gif_file

} else {

if [catch { MOM_refresh_display } res] {

INFO "$res"

}

if [catch { MOM_capture_image $mom_setup_part_gif_file } res] {

INFO "$res"

}

}

}

#<04-02-11> control the structure of the output files.

if { $ex_doc_output_file_structure } {

if [file exists $mom_setup_part_gif_file] {

file copy -force $mom_setup_part_gif_file $ex_doc_output_dir

file delete -force $mom_setup_part_gif_file

}

}

#set cam_setup_gif [Get_NativeName ${mom_output_file_directory}CAM_SETUP_part.gif]

#if [file exists $cam_setup_gif] {

# file copy -force $cam_setup_gif $ex_doc_output_dir

# file delete -force $cam_setup_gif

#}

set ex_doc_gif_name [file tail $mom_setup_part_gif_file]

}

 

 

2nd Question -  If "mom_output_file_basename"  is to output the name of the NC output file without extension or directory path.  For example: test C120H1022A100.html, why do I have to maunally type in the NCprogram name in the shop documentation dialog?

 

3rd Question - Say I wish to output a tool list and operation list separately for each NCprogram, the way it's setup now I have to type in something to differentiate between an operation list and a tool list. Any suggestions on how I can add syntax to automatically keep each list separate?

5 REPLIES

Re: HTML Shop Doc questions

The output file structure is determined by the global variable "ex_doc_output_file_structure" set in the Tcl file of the template being used. For example, this is how "shopdoc_template_English_operation_list_select.tcl" looks:

 

set cam_shopdoc_dir [MOM_ask_env_var UGII_CAM_SHOP_DOC_DIR]
set ex_doc_template_file "[file rootname [info script]].htm"


################################################################################################
# Three types of structures for output files
#
#   ex_doc_output_file_structure:
#
#     0  --- Place all the files in the selected output folder.
#     1  --- *.html file & related-folder.
#            If ex_doc_new_folder_name is "", it will be set as "${mom_output_file_basename}_files".
#     2  --- Place all the files in a new folder, which is in the selected output folder.
#            If ex_doc_new_folder_name is "", it will be set as "${mom_output_file_basename}_files".
#

    set ex_doc_output_file_structure  0
    set ex_doc_new_folder_name        ""

################################################################################################


source "[file dirname [info script]]/shopdoc_excel.tcl"

By default, variable "ex_doc_output_file_structure" is set to "0". You can set this variable for each template or set it globally in the "shopdoc_excel.tcl" for all your shopdoc runs.

 

Give this a try first,see if it does anything. Don't get your 2nd & 3rd questions:-(

 

 

Re: HTML Shop Doc questions

[ Edited ]

Question #1: "shopdoc_exec.tcl" I have set to (1) as in my picture. That works with how we do things. Setting to (0) leaves all files loose in the destination folder, while (2) throws all files including ".hmtl" file into the "_files" folder. The file "Setup_part.gif", no matter what the setting stays in the destination folder like I show in my picture. Our project folder may contain multiple part files and we have a folder in each project folder to save shop docs to which we have multiple shop docs. Each time I write a shop doc for a specific component it will overwrite that "Setup_part.gif" , being it lies outside the "_files" folder. I would have to physically move it to that "_files" folder for each time I write a shop doc. Not sure what purpose that  "Setup_part.gif" serves anyway. I can delete it and it does not harm or change the shop doc. For sure I do not want it loose in my shop doc folder.

 

Question #2: I'm looking for a way to automatically put it in my shop doc folder without having to do so much typing and I thought that is what the variable "mom_output_file_basename" would do by taking the name of my NC program and naming the shop doc the same.

 

Question #3: I have looked more into things and for now will attempt to settle that. I just like the horizontal structure and variables better on the "operation list" and the "tool list" vs. the "English_letter" and wished they were combined as in the "English_letter".

Re: HTML Shop Doc questions

It looks like some error with "shopdoc_excel.tcl" that has caused "SETUP_part.gif" not getting deleted after being created and copied (into "<part file name>.gif"). "SETUP_part.gif" serves no purpose when a shopdoc is completed.

 

"mom_output_file_basename" is set to <part file name> by default. When "ex_doc_output_file_structure" is set to "1", "<part file name>.gif" will be moved into the sub-folder where all the supporting elements for the HTM page reside.

Re: HTML Shop Doc questions

[ Edited ]

Is there a variable for the name of the the NC Proogram? If there is, where would I enter that? What I'm looking for is in the "shop documentation" dialog, where I set the path and name of the shop doc I'm posting, to be the same name as the NC Program.  Possible? In another software we use, I set a path and then use a variable {ncprogram} and it will stay unless I change it. Anything like that possible?

Example would look something like "K:\project_name\shop_docs\{ncprogram}"

Re: HTML Shop Doc questions

It depends on how you run your shop-doc.  The NC_PROGRAM will only come into being when you run shop-doc by selecting an object on the Program View.  Variable "mom_group_name" will carry the name of the top level group object which would be NC_PROGRAM.  This variable is not available until the handling of MOM_PROGRAMVIEW_HDR (proc).

 

No, you may enter "$mom_group_name" as part of your output file destination. The name entry only accepts static string as the output file name.

 

Currently, to get what you described, you will have to write some codes (copy, rename, etc.)  and stick them to the end of (or override) MOM_End_Part_Documentation proc.

 

BTW, you can also turn on the Review Tool (on the dialog) while you run shop-doc. It will spit out the info telling you what are the events being handled and what variables are available in which event and so on.  3 files "<your_logname>xxx_review.out", "<your_logname>xxx_proc.out" and "<your_logname>xxx_debug.out" will be created in the same directory as the shop-doc outputs.  You can just open the "<your_logname>xxx_review.out" in a text editor to search for the info.

 

Learn online





Solution Information