You need to use the previously posted macro to extract the text from the
user command.
 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg04138.html
<http://www.mail-archive.com/[EMAIL PROTECTED]/msg04138.html> 
 


================================================== 
 Fred Lauzus, CAM Programming Coordinator 
 High Steel Structures, Incorporated 
  mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.highsteel.com <http://www.highsteel.com/>  
================================================== 
  

-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 12:36 PM
To: [EMAIL PROTECTED]
Subject: [mfg-smartcam] Macro string help



I'm trying to break down a user element into a number of string variables
using a macro.

 

At the beginning of off all our wire programs we place a user element on T1
in

the following format

 

#S1= program name rev level drawing number die number decription

 

A typical example is...  #S1=AG0256-1 REV.AA 252171-037 DIE 360 TRIM SECTION
X SHIM

 

In the above example I'm having trouble getting  "#S1=AG0256-1 REV.AA
252171-037 DIE 360 TRIM SECTION X SHIM"

string into #VAR1

 

Below is what I'm trying.

 

STRING: #VAR1

STRING: #VAR2

STRING: #VAR3

STRING: #VAR4

STRING: #VAR5

STRING: #VAR6

STRING: #VAR7

STRING: #VAR8

 

NAME_ELMT[EL="1", EN="S1"]// name the T1 user element 1 as S1

 

#VAR1=STRTMP("S1")// this is where I'm having trouble???

 

#VAR2=STRSUB(#VAR1,12,1)// returns the file number operation  ie. 1,2,3, etc

 

#VAR3=STRSUB(#VAR1,28,3)// returns the drawing's detail number   ie. 037

 

#VAR4=AG0256-

 

#VAR5= REV.AA 252171-

 

#VAR6=STRLEN(#VAR1)

 

#VA7=STRSUB(#VAR1,29,#VA6-29)// returns the rest of #S1 after the detail
number ie  DIE 360 TRIM SECTION X SHIM

 

// put it all back together

#VAR8=STRTMP("%#VAR4%#VAR2%#VAR5%#VAR3%VAR7")

 

 

MOD_UEVENT[EL=1, XS2=0, YS2=0, TX=STRTMP("%#VA8"), LV=0]

 

 

 

Regards,

Michael Senack

======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to