Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

API Question 1

Status
Not open for further replies.

Scorch

Mechanical
Feb 13, 2002
80
0
0
US
I looked in the API help and could not find anything to return the perimeter value that you get when using the measure tool. I want to retrieve that number and use it elsewhere in a titleblock via a macro.

Scorch

Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.
--Howard Aiken, IBM engineer

 
Replies continue below

Recommended for you

Could you write your own function by examining the sketch and then looking at common lines?

Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
 
Evan,

There is a macro at: called Cutting Cost Estimator that has the functionality I am looking for. You select a face and the macro calculates the total cut inches, number of pierce cuts and will calculate the cost of the part by your prices you set. I just want to know how he got the cut length to work, the macro is password protected. If you get a chance take a look at the macro and see if you can figure it out.

Thanks,
Scorch

Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.
--Howard Aiken, IBM engineer
 
For pierce cuts, use Face2::GetLoopCount and subtract 1 for the outer edge.

For the perimeter measurement, use Face2::GetEdges to get a list of the bounding edges, then use a loop to call Edge::GetCurve to get the defining curve for the edge, followed by swCurve.GetLength2 to get the length. The "Get Length of Edge" example in the api help shows how to do this.
 
Status
Not open for further replies.
Back
Top