Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Cosmetic Thread API Question

Status
Not open for further replies.

moleary

Computer
Mar 23, 2005
38
I'm attempting to get extract some data about cosmetic threads. A piece of my code is below. The last line in the if block is crashing and I was hoping someone could point out why. It can't be because spThreadFeature is not valid because it is used in two previous statements. Thanks for any help!
------------------------

if (strFeatureType.CompareNoCase(_T ("CosmeticThread")) == 0)
{
//access cosmetic thread
CComPtr<IUnknown> spUnknownFeature;
hr = spSubFeature->IGetDefinition(&spUnknownFeature);
CComPtr<ICosmeticThreadFeatureData> spThreadFeature;
spUnknownFeature->QueryInterface(&spThreadFeature);

//Get the type of the cosmetic thread diameter
long lDiameterType = 0;
hr = spThreadFeature->get_DiameterType(&lDiameterType);
double dDiameter = 0.0;
hr = spThreadFeature->get_Diameter(&dDiameter);

//traverse the circular edge to which this cosmetic thread is attached
CComPtr<IEdge> spEdge;
hr = spThreadFeature->get_Edge(&spEdge);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor