======================================================================= HONEYWELL SDRC - TIPS and TRICKS ----------------------------------------------------------------------- submitted by : Stephan Klein shklein@cfen.honeywell.com subject : Create views and insert drawing format directory : /user/info.mcae/ date: 97-05-20 filename : sdrc_draft_dwgformat.txt sheet: 01 of 00 ======================================================================= The purpose of this program set is to: Automatically insert drawing formats for use in single and multi- sheet drawings. NOTE: The drawing format symbols are created as nested symbols. A drawing format with borders, linework etc, is a nested symbol inside another symbol that has the TEXT that will be edited. This text includes the title, drawing number, revision, designername, and any other text that changes from drawing to drawing. As the "-text" symbol is inserted, it is smashed to allow editing. The nested border symbol stays intact and can not be edited. NOTE: We like to have an extra 1/4 inch around the outside of the drawing for plotting purposes. The program resizes the paper view to add this 1/2 inch and offsets the format view origin 1/4 inch. If you don't want this feature, remove the offset in the program file where noted. ----------------------------------------------------------------------- >From drafting: 1.) Execute program: sdrc_draft_dwgformat.prg 2.) Pull down and select a drawing size from the "User List" of options ======================================================================= The program will automatically: Examine main view size to determine drawing format size. Automatically resize the main view to allow an extra 1/4 border. Create a new view to contain the first sheet drawing format. Import the drawing format symbol selected from the list. Insert and smash the "-text" format to allow editing of the text keeping the nested drawing border symbol intact. VARIABLES USED: directory -directory name where formats are located format(8) -list array for format selection dwgformat -drawing format size, C,D,E... sel -selection flag the_end -jump address labelb -jump address labelc -jump address labeld -jump address labele -jump address label10 -jump address ======================================================================= PROGRAM FILE: c: ======================================================================= c: HONEYWELL SDRC - TIPS and TRICKS c: ----------------------------------------------------------------------- c: written by : Stephan Klein shklein@cfen.honeywell.com c: subject : Create views and insert drawing format c: directory : /user/info.mcae/ date: 97-05-20 c: filename : sdrc_draft_dwgformat.prg sheet: 01 of 00 c: software ver : SDRC I-DEAS ms5m3 c: ======================================================================= c: # show message ("S.KLEIN - DRAWING FORMAT INSERTION PROGRAM Ver: 5.3") # set programming environment ("file_var_mode",1) # set programming environment ("list_var_mode",1) # delete all c: c: ----------------------------------------------------------------------- c: edit the directory text to the location of your drawing format symbols c: ----------------------------------------------------------------------- # directory = "/user/info.mcae/SYMBOLS/" c: # declare format(8) # format(1) = "B-First Sheet" # format(2) = "B-Continuation" # format(3) = "C-First Sheet" # format(4) = "C-Continuation" # format(5) = "D-First Sheet" # format(6) = "D-Continuation" # format(7) = "E-First Sheet" # format(8) = "E-Continuation" c: # repeat # erase prompt # show prompt ("Select a drawing format") # get list (8,format,,sel) # if ((sel eq -1) or (sel eq -2)) then goto the_end # until (sel gt 0) c: c: ----------------------------------------------------------------------- c: edit the drawing format names to your symbol names (without the .sym) c: We use a format symbol Bf_e inserted into a symbol with the text (title c: etc) so that when it is smashed, the text is editable but the format c: outline stays as a symbol. c: ----------------------------------------------------------------------- # if (sel EQ 1) then dwgformat="Bf_e-text" # if (sel EQ 2) then dwgformat="Bc_e-text" # if (sel EQ 3) then dwgformat="Cf_e-text" # if (sel EQ 4) then dwgformat="Cc_e-text" # if (sel EQ 5) then dwgformat="Df_e-text" # if (sel EQ 6) then dwgformat="Dc_e-text" # if (sel EQ 7) then dwgformat="Ef_e-text" # if (sel EQ 8) then dwgformat="Ec_e-text" # if (sel EQ 1) or (sel EQ 2) then goto labelb # if (sel EQ 3) or (sel EQ 4) then goto labelc # if (sel EQ 5) or (sel EQ 6) then goto labeld # if (sel EQ 7) or (sel EQ 8) then goto labele # goto the_end c: c: ----------------------------------------------------------------------- c: NOTE: the .5 added to each view size will enlarge the paper size to c: provide an extra 1/4inch all around the format. This is a c: preference we liked and may be removed if you want the paper c: size exactly the same as the format size c: ----------------------------------------------------------------------- # labelb: X: VB K: V "1"@ X "17.5" Y "11.5"@ X: VC K: X "0" Y "0"@ X "17.5" Y "11.5"@ X "0.25" Y "0.25"@ EX ^@ ^@ # goto label10 # labelc: X: VB K: V "1"@ X "22.5" Y "17.5"@ X: VC K: X "0" Y "0"@ X "22.5" Y "17.5"@ X "0.25" Y "0.25"@ EX ^@ ^@ # goto label10 # labeld: X: VB K: V "1"@ X "34.5" Y "22.5"@ X: VC K: X "0" Y "0"@ X "34.5" Y "22.5"@ X "0.25" Y "0.25"@ EX ^@ ^@ # goto label10 # labele: X: VB K: V "1"@ X "44.5" Y "34.5"@ X: VC K: X "0" Y "0"@ X "44.5" Y "34.5"@ X "0.25" Y "0.25"@ EX ^@ ^@ # goto label10 c: c: ----------------------------------------------------------------------- c: FYI: The FI-import command was used instead of the symbol command to c: eliminate having to check if a symbol already existed/overwrite c: This reduced number of lines of code from a previous version. c: ----------------------------------------------------------------------- # label10: X: FI K: SS K: N directory+dwgformat K: ^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@ X: II K: N dwgformat K: ^@ SM T X "0" Y "0" ^@ ^@ ^$ c: # the_end: # delete all E : END