If I have a RectangularPattern how do I suppress individual features in the pattern.
For example I have a single row of holes, and I want to suppress the odd numbered holes.
I've tried this...
CComPtr<FeaturePatternElements> pFeaturePatternElements ; pRectPatFeat->get_PatternElements (&pFeaturePatternElements) ; const int ikNumElements = pFeaturePatternElements->GetCount() ; wprintf (L" this has %d FeaturePatternElements\n",ikNumElements) ; for (int iElem = 1 ; iElem < ikNumElements ; iElem++) { CComPtr<FeaturePatternElement> pFeaturePatternElement ; pFeaturePatternElements->get_Item (iElem,&pFeaturePatternElement) ; // CRASH here.... pFeaturePatternElement->Suppressed = (((iElem/2)*2) == iElem) ; }
... but it crashes at the assignment of Suppressed
Solved! Go to Solution.
Solved by adam.nagy. Go to Solution.
Hope this post could give you some idea:
Cheers,
Thanks for the link, but it seems to have been a C++/COM problem.
If I use put_Suppressed() it works and does not crash.
If I used Suppressed = (as in my original post) it does.
Hey ho hum.
Hi,
I've just written a blog post about this: http://adndevblog.typepad.com/manufacturing/2013/08/crash-when-not-using-raw-com-interface-to-set-pr...
I hope this helps.
Cheers,