First question, I think you would have to write it to a file then use #INCLUDE().
One alternative would be to use a variable in the jof file. Place the line "#ISSUE=A" in the job notes section (without quotes). Add then next two lines @DECLARE #STR #ISSUE to the top of your tmp file and then place #ISSUE where you want the output. Another alternative is to use the part description which is what we do. The first two characters of the part description are the engineering level, "--" means no changes, "A-" means change A. To get the output you would use the following lines in the TMP file. #EVAL(#S0=JOS(prt_desc)) #EVAL(#S0=STRSUB(#S0,1,2)) then place #S0 wherever you need the output. Second question, If the customer is part of the directory of the pm4 file I would recommend getting that from the filename. If you put the code files in the same directory you can get the whole thing with the following commands. #pm4file=SHPFILE() #pm4path=GET_PATH(#pm4file) to get the filename without the path or extension #filename=GET_NAME(STRIP_EXT(#pm4file)) Note: you must string all variables before using them. Our file naming is strictly controlled on the pm4 file so the code file is automatically created with no intervention. It works for us but maybe not for everyone. Let me know if you want some examples or further explanations. Bill Wepking CAM Programming Mgr Landis Gardner -----Original Message----- From: Bill Payter [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 8:17 AM To: SmartCAM Users Subject: [mfg-smartcam] From macro to code? Hi guys, two questions:- First, how to go from a PROMPT in a macro to CODE, for example:- PROMPT[TX="At what issue is the drawing?", VN="ISSUE", SR=4, SC=35] How to I get from here to this line in the actual code, for example:- (DRG 1234, ISSUE A) Second, how to select a directory in which to save files:- PROMPT[TX="For which customer is this programme?"\n \n Enter name of CUSTOMER.", VN="CUST", SR=5, SC=35] Which will let me put this line later in the macro, for example:- CODE[FN=STRTMP("C:\\BILL\\%#CUST\\%#FILEN"), MF="C:\\BILL\\FANUC.SMF", TF="C:\\BILL\\FANUC.TMP", SH=1, DC=1, RP=0, ST=0, DT=0, SP=9] What actually needs to be added or changed to get these two to work? Thanks in advance, Bill. P.S. Thanks Dave W, got one SAT file to load OK into SmartCAM by saving as an earlier version, still have another file that whatever version SAT file I save it as it crashes SmartCAM Free-Form in an instant WITH A C++ RUN TIME ERROR!!! ====================================================================== 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] ======================================================================
