Chris,
Sorry for the misinterpretation of you original question.
There is no built in provision in the template language to
format strings to a fixed length. The following routine may
be of help to you. What it does is add a series of 40 space
characters to the end of #TLDESC, then trims the left section
of the variable to a fixed length.
// Pad string variable with trailing spaces
#EVAL(#TDESC=#TDESC )
// Trim the string variable to the desired
// length truncating extra trailing spaces.
#EVAL(#TDESC=STRSUB(#TDESC,1,40))
// Output the formatted variable to code.
T#TOOL : #TDESC ATC [ ] Z OFFSET [ ]
I know there are is a problem when the combined string exceeds
a certain length. You'll have to do some experiments to find
the limitations.
---------------------------------------------------------------
Another option available to you for setup sheets, besides report
generators and code generators, is to write a macro that utilizes
the format options available for the F_WRITE command. I've
attached a ZIP file containing a series of macros I wrote a few
years back. These macros try to emulate the old Job Plan .jsf
style print out with aligned columns.
To use the macros, extract the files and place them in the same
folder. Then go into SmartCAM and load a process model file with
some steps, Then run the macro "PrintJsf.mcl". The macro writes
a text file to the same folder as it resides and the opens the
file in edit plus for printing.
The macro may be a little complex but it should give you some
good examples of formatting data for output using the F_WRITE
command.
The example macro loops through and outputs all the steps in the
planner, even those not used in the model. You can build a macro
that loops through the elements, checks if the element is
unmasked toolpath using the VIS( ) and STEP( ) functions to
restrict the output.
// set element counter
#el_num=1
// loop through entire database
WHILE(#el_num<=TOTEL())
// check if current element is visible
IF(VIS(#el_num)=1)
// check if current element is toolpath
IF(STEP(#el_num)<>-1)
// gather information from planner
// write information to file
ENDIF
ENDIF
// advance element number
#el_num=#el_num+1
ENDW
=============================================
Fred Lauzus, CAM Programming Coordinator
High Steel Structures, Incorporated
mailto:[EMAIL PROTECTED] http://www.highsteel.com
=============================================
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 30, 2000 12:15 PM
To: [EMAIL PROTECTED]
Subject: [mfg-smartcam] Re-stating a question...
In response to my setup sheet question many of you have sent
information on the report generator. While I appreciate your replies, the
fact of the matter is that I already have my report generator customized. I
don't like using it because it makes a list of every tool in the process
model, even hidden tools. I either need to further custom the report
generator to list only visible tools, or I need to revisit making a setup
sheet or tool list through the code generator.
The information I need is this: Can a post be customized so that the #
of spaces output for a text string (such as #TLCMT) are forced or
formatted? I am looking for the same type of control that we have in the
report generator. I suspect the answer is no, but I thought I'd ask.
Again, thanks for your replies so far,
Chris
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================