Message 1 of 2
Getting and Setting Adaptive for HoleFeature using VC++
Not applicable
05-13-2003
09:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having some trouble getting and setting the Adaptive property using
VC++. I need to set the adaptivity when a user selects this option in a
dialog box that creates our company's standard holes. I also need to
retrieve the current adaptive setting if the user selects a HoleFeature to
edit. Below are some of the options I have used. They all compile, but on
getting the adaptive setting I get a return value of 0 if the HoleFeature
is not adaptive and a return value of -1 when the HoleFeature is adaptive.
When I try to set the HoleFeature adaptive the add-in crashes Inventor.
// Getting adaptivity setting
VARIANT_BOOL bAdaptive;
bAdaptive = pHoleFeat->GetAdaptive();
hr = pHoleFeat->get_Adaptive(&bAdaptive);
pHoleFeat->get_Adaptive(&bAdaptive);
bAdaptive = pHoleFeat->Adaptive;
// Setting adaptivity
VARIANT_BOOL test = TRUE;
pHoleFeat->put_Adaptive(test);
pHoleFeat->PutAdaptive(test);
hr = pHoleFeat->put_Adaptive(test);
Thanks in advance for any help
Josh
VC++. I need to set the adaptivity when a user selects this option in a
dialog box that creates our company's standard holes. I also need to
retrieve the current adaptive setting if the user selects a HoleFeature to
edit. Below are some of the options I have used. They all compile, but on
getting the adaptive setting I get a return value of 0 if the HoleFeature
is not adaptive and a return value of -1 when the HoleFeature is adaptive.
When I try to set the HoleFeature adaptive the add-in crashes Inventor.
// Getting adaptivity setting
VARIANT_BOOL bAdaptive;
bAdaptive = pHoleFeat->GetAdaptive();
hr = pHoleFeat->get_Adaptive(&bAdaptive);
pHoleFeat->get_Adaptive(&bAdaptive);
bAdaptive = pHoleFeat->Adaptive;
// Setting adaptivity
VARIANT_BOOL test = TRUE;
pHoleFeat->put_Adaptive(test);
pHoleFeat->PutAdaptive(test);
hr = pHoleFeat->put_Adaptive(test);
Thanks in advance for any help
Josh