Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Mar 23, 2005
Messages
38
Location
SG
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

Back
Top