API Question
API Question
(OP)
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
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






RE: API Question
Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
RE: API Question
There is a macro at: http://www.kentcontract.com/swmacros.shtml
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
RE: API Question
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.