|
If anyone is interested here is the CCW to CW Profile macro.
To change macro to go the other direction just set the offset direction parameter of the GRP_WALL command to be #OFFSETDIR=0 to 1
// Advanced_Wedm 11.5 Windows 10/16/98 16:48:10 Macro File // w:\mcl\CCW2CWP.mcl CCW to CW Profile macro // CREATED: 04/05/04 // // Instructions: // Insert After any piece of geometry on a CCW profile and macro, // execute CCW2CWP.mcl and the profile will become a CW profile
// From: Pete Ruehle [mailto:[EMAIL PROTECTED] // Sent: Monday, April 05, 2004 3:07 PM // To: [EMAIL PROTECTED]; [EMAIL PROTECTED] // Subject: RE: [mfg-smartcam] Profile direction
// Michael,
// You can group the profile and use wall offset to check the direction. // For example, do a group wall offset to the left with a huge distance relative to the work you do, // then get the "result" group and check if there are any elements in the group. // If there are, your direction is clockwise. // I set DS=100. in mine because I never work on anything close to that size. // So if the direction of the profile is CCW, no elements will be created by the wall offset.
//PAUSE[TX="The so far so good macro pause!", LR=10, LC=5, SR=2, SC=40, PT=1] VAR_REMOVE_ALL[]
GRAPHICS_OFF[]
// select profile that you are inserted on PROF_GRP[AR=0, EL="seqel()"] NAME_ELMT[EL="SEQEL()", EN="ELEMENT"]
// name this selected profile PROFILE NAME_GRP[GN="PROFILE", RM=0]
// Set direction to left #OFFSETDIR=0
// Offset by 100 inches GRP_WALL[SD=#OFFSETDIR, DS=100.0, ME=0, RP=1, LR=0, TA=0, AN=180]
// Clear current group NEW_GRP[]
GET_GRP[GN="RESULT", AR=0] // Get the 'Result' group
IF(GRP(0)<1) // Check group size, if empty, direction is CCW GET_GRP[GN="PROFILE", AR=0] //get the original profile, and reverse direction GRP_REVERSE[RP=1] GOTO(EXIT) ELSE GRP_DELETE[] // If not empty, delete resulting elements. Direction is CW GET_GRP[GN="PROFILE", AR=0] ENDIF
@EXIT
NEW_GRP[] // Clear current group NAME_GRP[GN="PROFILE", RM=1] // clear PROFILE name ELMT_SEQ[BA=1, EL="ELEMENT", ME=1] CL_NAME_ELMT[EL="ELEMENT" ]// clear ELEMENT name
GRAPHICS_ON[] |
