It is now working! I've attached the mcl if anyone is interested. Thanks for all the help...for now.
-----Original Message----- From: ZUBER,DAVE (HP-Corvallis,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 8:30 PM To: '[EMAIL PROTECTED]' Subject: RE: [mfg-smartcam] I'm looped! My example was wrong, try #2... Inside your While loop, you have: #Start=#Start+#Count And also #Count=#Count+1 The first time start is 1st ele, count is 1 the second time start is 1st+1, count is 2 thrid, start is 1st+1+2 = 1st+3, count is 3 forth, start is 1st+1+2+3 = 1st+6, count is 4 etc. you probably want to increment start only by 1, not by count? Dave Zuber +--------------------------------------------+----------------------+ | ME CAD Software Tools & Support Team | ME CAD Homepage: | | | | | Rob Midtun x5-6244 Lorna Vinson x5-6520 | http://cad | | Chris Miller x5-1546 Dave Zuber x5-2129 | | +--------------------------------------------+----------------------+ -----Original Message----- From: Michael Senack [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 31, 2001 2:48 PM To: '[EMAIL PROTECTED]' Subject: [mfg-smartcam] I'm looped! Below is my mcl that takes the selected elements the user has picked, and places them at the end of the database in the order they were picked. Then a while/endw loop selects the first element of the group and names it E1. Then the loop increments by one. It selects the next element in the group and names it E2 and so on. However, the loop works great for the first two elements then it skips the 3rd and names the fourth. Then it skips the fifth and names the sixth and so on... WHY?? I cannot see it yet?? // Advanced_Wedm 11.5 Windows 10/16/98 16:48:10 Macro File // w:\mcl\agiePOCK.mcl // CREATED: 05/29/01 // //PAUSE[TX="The so far so good macro pause!", LR=10, LC=5, SR=2, SC=40, PT=1] //GRAPHICS_OFF[] VAR_REMOVE_ALL[] // Set sequence at end of database ELMT_SEQ[BA=1, EL="totel()", ME=0] // Move selected elements to end of database in the order they were picked SEQ_MOVE[SC=1] // Get first element in group #Start=GRP(1) // Get number of elements in group #No_Elmt=GRP(0) #End=totel() NEW_GRP[] //Keep count of # of profiles #Count=1 STRING:#Name INTEGER:#Count WHILE(#Start<=#End) // hmmm... PROF_GRP[AR=0, EL=#Start] #Name=STRTMP("E%Count") //Name element NAME_ELMT[EL=#Start, EN=STRTMP("%Name") ] NEW_GRP[] #Start=#Start+#Count #Count=#Count+1 ENDW Regards, Michael Senack, CNC Programmer Blount Canada Ltd 505 Edinburgh Road North Guelph Ontario N1H 6L4 519 822 6870 X354 FAX 519 822 1450 http://www.blount.com/ ====================================================================== 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] ======================================================================
AGIEPOCK.MCL
Description: Binary data
