Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Get distance between faces

Status
Not open for further replies.

cwsink

Automotive
Mar 22, 2006
163
Hello,

I'm attempting to write a macro that would apply a distance mate. I want it to default to the current distance between faces. The problem is I don't know how to get that distance. I've only found the ModelDoc::ToolsDistance method, which doesn't seem to return a value. The other option is the swModel.ClosestDistance which isn't always the correct value.

Can anyone offer some guidance? I'm pretty new to this stuff, so I'm not real creative, but a little direction would go a long way.

Thanks,


Craig Sink
Mechanical Engineer
Force Design, Inc.
 
Replies continue below

Recommended for you

Instead of API, could you use a shortcut key to invoke the distance mate after selecting the faces? The distance is maintained that way.

Maybe the API will do the same if you select the faces first?

[cheers]
SW07-SP3.1
SW06-SP5.1
 
I have a shortcut key, but I want to apply the mate without opening the Property Manager. Similar to a SmartMate, but different in that it would default to the existing distance (like the mate command).

Thanks,

Craig Sink
Mechanical Engineer
Force Design, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor