Mike, Try something like this:
STRING:#F_NAME
PROMPT[TX="What is the part number?",VN="F_NAME"]
STRING:#VR0
#VR0= STRTMP("**** PART NO. %F_NAME")
UEVENT[XS=#HOMEZ, YS=#HOMEX, LV=0, TX=#VR0]
It is really a two part deal. First you declare two strings. One is used
as the variable in the prompt command and
the other is one that is built by concatenating the desired string with the
user response to the prompt. In the above example,
I prompt for a file name, combine that with the string "***** Part NO."
The % tells the STRMP command that what follows is a
variable, in this case F_NAME.
Then I use the user event to print the phrase "****** PART NO. + user
response" to the manuscript.
David
"Mike Senack" <[EMAIL PROTECTED]> on 03/19/2000 12:36:11 AM
To: "SmartCAM User Group" <[EMAIL PROTECTED]>
cc: (bcc: Dave Hayden/elliott)
Subject: [mfg-smartcam] V11.5 macro help
Could anybody out there show me a way to get a string variable into the
ending part of a file name.
Below is my attempt.
What I would like is for this macro to prompt me to enter a two digit
number like 052 and place it on the drive path & partial file name in the
MERGE command. So the file name would go from this
"w:\\360\\FLATS\\flat???" (where the ??? would be the string variable) to
this "w:\\360\\FLATS\\flat052"
// Advanced_Wedm 11.5 Windows 10/16/98 16:48:10 Macro File
// w:\mcl\mf.mcl
// CREATED: 03/18/00
//
//
STRING: #VAR1
//
MERGE[FN="w:\\360\\FLATS\\flat #VAR1", FT=2, XS=0, YS=0, ZS=0] // need
help on this line
//
VIEW_ANGLE[A1=0, A2=0, VA=2, VP=0, RS=1, WP=0]
VIEW_ANGLE[A1=0, A2=0, VA=2, VP=0, RS=1, WP=0]
Below is a sample from another macro that I've made using the Pause box to
appear to enter a numeric value.
This would be what I would like happen for a string variable input without
any checking.
// check HEIGHT variable
//
WHILE(#HEIGHT<=0)// check HEIGHT to see if it is bigger then zero
// the \n acts a c/r page 66 Automating SmartCAM with Macros
PAUSE[TX="ERROR: The HEIGHT of the dimension must\n
be greater then zero!", PT=1] // Include box cancel
option
#HEIGHT=1000000 // this resets HEIGHT variable to an unknown value
ENDW
//
Thanks for any help.
Michael Senack,
Your local friendly neighborhood CNC Programmer.
|
Could anybody out there show me a way to get a
string variable into the ending part of a file name.
Below is my attempt.
What I would like is for this macro to prompt me to enter a
two digit number like 052 and place it on the drive path & partial file name
in the MERGE command. So the file name would go from this
"w:\\360\\FLATS\\flat???" (where the ??? would be the string variable)
to this "w:\\360\\FLATS\\flat052"
// Advanced_Wedm 11.5 Windows 10/16/98 16:48:10 Macro File
// w:\mcl\mf.mcl // CREATED: 03/18/00 // // STRING: #VAR1 // MERGE[FN="w:\\360\\FLATS\\flat #VAR1", FT=2, XS=0, YS=0, ZS=0] // need help on this line // VIEW_ANGLE[A1=0, A2=0, VA=2, VP=0, RS=1, WP=0] VIEW_ANGLE[A1=0, A2=0, VA=2, VP=0, RS=1, WP=0] Below is a sample from another macro that I've
made using the Pause box to appear to enter a numeric value.
This would be what I would
like happen for a string variable input without any checking.
// check HEIGHT variable
// WHILE(#HEIGHT<=0)// check HEIGHT to see if it is bigger then zero // the \n acts a c/r page 66 Automating SmartCAM with Macros PAUSE[TX="ERROR: The HEIGHT of the dimension must\n be greater then zero!", PT=1] // Include box cancel option #HEIGHT=1000000 // this resets HEIGHT variable to an unknown value ENDW // Thanks for any help.
Michael Senack,
Your local friendly neighborhood CNC Programmer. |
