This is a macro that we use to get the Profile Length
of a carbide component, then multiply it by a feed rate
per hour to approximate the time it will take the wire
machine to do the job.

// Production_Milling 11.5 Macro File
// w:\mcl\pl.mcl
//
// Instructions:
//  select the profile(s) by double clicking on them
//  and  Macro, Execure w:\mcl\pl.mcl
//
// From: Pete Ruehle [mailto:[EMAIL PROTECTED]
// Sent: Friday, June 28, 2002 11:55 AM
// To: Michael Senack; '[EMAIL PROTECTED]'
// Subject: RE: [mfg-smartcam] Profile length of multiple profiles
//
//
//Try the attached macro.  I believe it came from Chris some time ago.
//
//PAUSE[TX="The so far so good macro pause!", LR=10, LC=5, SR=2, SC=40,
PT=1]
VAR_REMOVE_ALL[]


// check for active group
IF(GRP(0)>0)

// store current active group as named group
NAME_GRP[GN="TEMP", RM=0]

// set starting length to 0
#length=0

// start loop if any elements are in the active group
WHILE(GRP(0)>0)

  // add length of first grouped profile to variable
  #length=#length+LENP(GRP(1))

  // remove first grouped profile from active group
  PROF_GRP[EL=GRP(1), AR=1]

  // continue loop until all elements have been removed from the active
group
ENDW

// restore original named group as the active group
GET_GRP[GN="TEMP"]

// remove named group name from list
NAME_GRP[GN="TEMP", RM=1]

ENDIF

// display result
PAUSE[TX=STRTMP("Total of all grouped profile lengths=%length"), SR=2,
SC=15, PT=0]

// *********** Below is my original Profile Length macro ************
// Production_Milling 11.5 Macro File
// w:\mcl\pl.mcl
//
// This macro finds the length of a selected profile.
// If there is more then one selected profile it will
// return the length of the first profile in the data base
//
// Instructions:
//  To run the macro unselect all geometries using F2 key.
//  On the insert property bar click on any element of the
//  profile that you want to find the length of and run the 
//  w:\mcl\pl.mcl.
//
//
//VAR_REMOVE_ALL[]
//
//STRING:#text_str
//STRING:#prompt_str
//
//#length=LENP(seqel())// page 83 of SmartCAM Customization Guide
//
//#text_str="Profile length="
//#prompt_str=STRTMP(%text_str%length)
//
//PAUSE[TX=#prompt_str, SR=2, SC=15, PT=0]

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 28, 2004 1:21 PM
To: [EMAIL PROTECTED]
Subject: RE: [mfg-smartcam] Total length of element group

These 2 functions are available in a macro, taken from the SmartCAM
Customization Guide:

LENE(elmt) Path length of element
LENP(elmt) Path length of profile
 
+ You cannot use the measure functions LENE() and LENP()on a helix. If
you
use these in a macro to measure a helix, SmartCAM will display an error
message.

-----Original Message-----
From: Gary [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 28, 2004 8:38 AM
To: SmartCAM List Server
Subject: [mfg-smartcam] Total length of element group


I am looking for a way to get the total length of the elements in a
group
(lines, arcs, spline, ...)

Thank you for your help.

Gary
======================================================================
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]
======================================================================

Reply via email to