Message 1 of 4
How to extract polylines from surface contours
Not applicable
07-11-2008
04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have gotten hold of a COM pointer to an AeccSurfaceContour object, and also the object's ContourEntities stored in a VARIANT array (of VT_I4's, I presume).
However, if I try to access the elements in the array (using SafeArrayAccessData) and convert them to AcDbObjectIds by doing the following:
AcDbObjectId objId;
objId.setFromOldId (array);//presume 'i' is an index into the array
bool isIdValid = objId.isValid();
then isIdValid is false and hence when I try to use it in functions like AcAxGetIUnknownOfObject () or acdbOpenObject(), they return with an error and an unhandled exception, respectively.
What is stored in the VARIANT array and how do I use the values to get hold of the polylines that represent the contours?
Rasmus Bugge
However, if I try to access the elements in the array (using SafeArrayAccessData) and convert them to AcDbObjectIds by doing the following:
AcDbObjectId objId;
objId.setFromOldId (array);//presume 'i' is an index into the array
bool isIdValid = objId.isValid();
then isIdValid is false and hence when I try to use it in functions like AcAxGetIUnknownOfObject () or acdbOpenObject(), they return with an error and an unhandled exception, respectively.
What is stored in the VARIANT array and how do I use the values to get hold of the polylines that represent the contours?
Rasmus Bugge