Gary, My previous email attempted to answer this question before you asked it. GRP(GRP(0)) will return the element number of the last element in the current active group. To insert after the last element in the group, try the following:
ELMT_SEQ[BA=0, EL=GRP(GRP(0)), ME=1] ================================================== 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: gary [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 7:22 AM To: [EMAIL PROTECTED] Subject: [mfg-smartcam] Macro help The first part of the macro is working thanks to everybody's input. Now I want to add a short lead out line to the grouped geometry. The macro works on regular geometry but not on a helix. Therefore I need to add a short line in the macro. Currently the macro adds a line after the initial element. How can I force the macro to go to the end of the group. Thank you for everybody's input. WHILE( GRP(0)<=0) PAUSE[TX="ERROR: You have not selected any geometry!", PT=1] // If no geometry is selected this loop loops continuously until you select cancel GRAPHICS_ON[] ENDW VAR_REMOVE_ALL[] #elmt=GRP(1) ELMT_SEQ[BA=0, EL=#elmt, ME=1] LINE[XE=STX(#elmt), YE=STY(#elmt), ZE=STZ(#elmt), AN=0, DS=5, SE=2, SS=2] MOD_LINE[EL=#elmt, XS=STX(#elmt), YS=STY(#elmt), ZS=STZ(#elmt)+1, XE=ENX(#elmt), YE=ENY(#elmt), // This will alter the Z start point by + 1 mm ZE=ENZ(#elmt), SE=2, SS=2] // This will alter the Z start point by + 1 mm LEAD_IN[EL=#elmt, AN=45, DS=1, LC=0, TY=0, CS=0, RP=0, MO=0] PROF_SEQ[BA=0, EL=#elmt, ME=1] UEVENT[XS=STX(SEQEL()), YS=STY(SEQEL()), LV=STZ(SEQEL()), TX="@CMPL"] // ELMT_SEQ[BA=1, EL=#elmt, ME=1] // Lead out works on regular geometry Dose not work for Helix // LEAD_IN[EL=#elmt, AN=90, DS=1, LC=1, TY=0, CS=0, RP=0, MO=0] // Lead out works on regular geometry Dose not work for Helix VAR_REMOVE_ALL[] #elmt=GRP(1) // PROF_SEQ[BA=1, EL=#elmt, ME=1] // Not working yet // LINE[XS=ENX(#elmt), YS=ENY(#elmt), ZS=ENZ(#elmt), AN=180, DS=2, SE=2, SS=2] // Not working yet Regards, Gary ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
