Message 1 of 2

Not applicable
05-29-2018
05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I am using Inventor 2018 and programming an addin in C++. I would like to access the 'Distance' property in a DistanceChamferDefPtr object but I am getting a _com_error exception.
Snippet
ChamferFeaturePtr chamferFeature = chamferColl->GetItem(itChamfer); if (chamferFeature == NULL) return; ChamferDefinitionPtr chamferDef = chamferFeature->GetDefinition(); if (chamferDef->Type == kDistanceChamferDefObject) { DistanceChamferDefPtr distanceChamfer = chamferDef; if (distanceChamfer) { ParameterPtr distanceParam = distanceChamfer->Distance; double value1 = (double)distanceParam->Value; VARIANT_BOOL setBack = VARIANT_FALSE; setBack = distanceChamfer->CornerSetback; double angle = 45.000; } }
When I try to get the Distance or CornerSetback ParameterPtr is when the program raises the exception. Any clue where my problem could be located?
Regards
Solved! Go to Solution.