// Production_Milling v11.5 Windows 06/28/00
// w:\mcl\string.mcl
//
// This is a macro to show various string manipulations methods
//
//PAUSE[TX="The so far so good macro pause!", LR=10, LC=5, SR=2, SC=40,
PT=1]
VAR_REMOVE_ALL[]
STRING: #var1
STRING: #var2
STRING: #var3
STRING: #VAR4
STRING: #var5
STRING: #var6
STRING: #var7
STRING: #var8
STRING: #var9
STRING: #var10
// load W:\job\HS4142A.PM4 as the sample file for this macro
#VAR1=GET_NAME(SHPFILE())// returns HS4142A.pm4
#VAR2=GET_PATH(SHPFILE())// returns W:\JOB\
#VAR3=STRIP_EXT(SHPFILE())// returns W:\JOB\HS4142A
#VAR4=GET_NAME(JOBFILE())// returns HS4142A.JOF
#VAR5=GET_PATH(JOBFILE())// returns W:\JOB\
#VAR6=STRIP_EXT(JOBFILE())// returns W:\JOB\HS4142A
#VAR7=STRTMP("%#VAR1 ++ %#VAR2 ++ %#VAR3")// returns HS4142A.pm4 ++
W:\JOB\ ++ W:\JOB\HS4142A
#VAR7_LEN=STRLEN(#VAR7)// returns 40 which is the maximum length of a
con-cat-en-ated (excuse the spaelling) string
#VAR8=STRSUB(#VAR1,1,6)// returns HS4142
#VAR10=B.JOB
#VAR9=STRTMP("%#VAR2%#VAR8%#VAR10")// returns W:\JOB\HS4142B.JOB
//#VAR1=""// this nullifies VAR1
Looks like #VAR3 is the answer.
-----Original Message-----
From: Tom Cox [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 10:44 AM
To: Smartcam Tech (E-mail)
Subject: [mfg-smartcam] Strip Pm4 file extention
Can someone help me with this macro. I need to set a variable to the
current
pm4 file with the file extension stripped.
For example set the variable to equal "myfile" when the smartcam file is
"myfile.pm4.
I have seen it before but I can not remember the syntax.
Thanks
Thomas Cox
American Tool & Mold Inc.
======================================================================
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]
======================================================================