×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

API Question

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

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

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...

RE: API Question

(OP)
Evan,

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 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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources