Ok, here is what I've got. It's derived from Andy's and Dan's posts:
There are two macros; one codes the file and the other opens it.
Assign each to it's own button.
The first one (need to insert your machine and template files in the CODE
command):
STRING:#SHAPE
#SHAPE=SHPFILE()
STRING:#CODEFILE
#CODEFILE=STRIP_EXT(#SHAPE)
CODE[FN=STRTMP("%CODEFILE.NC"), MS1="<your machine file.smf>",
MT1="<your template file.tmp>", SH=1, DC=0, ST=1, DT=1, SP=9]
STRING:#LASTFILE
#LASTFILE=STRTMP("%CODEFILE.NC") //this variable is used by the second mcl
and the second:
SHELL[CMD_LN=STRTMP(%#LASTFILE), DP=1, WA=1]
Obviously, the second macro is dependant on the first. It will not run
without a value for #LASTFILE.
If the two are combined, then the file will automatically open after coding
as in Andy's example but without the yes-no prompt.
Enjoy the weekend
Pete
-----Original Message-----
From: Andy Beardmore [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 3:28 AM
To: 'smartcam user group'
Subject: FW: [mfg-smartcam] starting edit plus in smartcam
This is an example of the macros i use to post code:-
This macro will open the code file in an editor after posting it.
//THIS MACRO GENERATES CODE FOR THE CINCINNATTI SABRE 2000 VERTICAL M/C
//WITH AN ACRAMATIC 2300 CONTROL.
STRING:#FILE_NAME
STRING:#EXTN
STRING:#YESNO
#EXTN=.DTM
PAUSE[TX="PRODUCE CODE FOR THE SABRE ? OK TO CONTINUE
CANCEL TO EXIT",PT=1]
PROMPT[TX="ENTER PGM NO. INCLUDING .M09 FILE EXTENSION",
VN="FILE_NAME", DV=0]
PROMPT[TX="DO YOU WANT TO OPEN THE FILE AFTER POSTING IT?
ENTER 1 FOR YES AND 0 FOR NO!",
VN="YESNO", DV=0]
AUTO_ANSWER[AA="OK"]
CODE[FN=STRTMP("M:\\NCOUT\\%#FILE_NAME"),
MS1="L:\\SmartCam\\Smf-tmp\\Sabre.smf",
MT1="L:\\SmartCam\\Smf-tmp\\Sabre.tmp", SH=0, DC=0, ST=0, DT=0,SP=9]
IF(#YESNO=0)
GOTO(LABEL)
ENDIF
SHELL[CMD_LN=STRTMP(M:\\NCOUT\\%#FILE_NAME), WA=0, DP=0]
@LABEL
#YESNO=""
#FILE_NAME=""
#EXTN=""
If you setup file associations in explorer the code file will automatically
open in the application it is associated with if you answer yes to:-
PROMPT[TX="DO YOU WANT TO OPEN THE FILE AFTER POSTING IT?ENTER 1 FOR YES AND
0 FOR NO!".
Cool hey.
Not bad for a Limey.
> Andy Beardmore
> CadCam Technician
> SPS Aerostructures Ltd., UK
> Machining Facility, Mansfield
> Tel : +44 (0) 1159 880 500 ext.1586
> Fax : +44 (0) 1159 880 501
> E~Mail : [EMAIL PROTECTED]
>
> ----------
> From: Pete Ruehle[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, March 30, 2001 4:08 PM
> To: 'SmartCam Forum'
> Subject: [mfg-smartcam] starting edit plus in smartcam
>
> Good Morning:
>
> I have a toolbar button that starts edit plus without having to leave
> smartcam.
> I'd like to go one step further (farther?) and have edit plus open the
> last
> coded file.
>
> Yes? No?
>
> Thanks
> Pete
> ======================================================================
> 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]
======================================================================
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================