API: Get feature from sketch

This seems like an easy problem. Is there a call to get a feature that is created from a sketch?



Reply to
Brian Vogel
Loading thread data ...

Look up



Reply to
Corey Scheich

Ok, exactly what I need. Thanks.

Reply to
Brian Vogel


See Also Example Availability


This method gets the parent features for this feature.

Syntax (OLE Automation)

retval = Feature.GetParents ( )

Return: (VARIANT) retval VARIANT of type SafeArray pointers to Dispatch objects

Syntax (COM)

status = Feature->IGetParents ( retval )

Output: (LPFEATURE*) retval Pointer to an array of feature objects Return: (HRESULT) status S_OK if successful Remarks

This method gets only the direct parents of this feature. It does not get parents of parents.

If you are writing a COM application, use Feature::IGetParentCount to determine the array size necessary when calling this method. If you are writing a Dispatch application, you do not have to call GetParentCount since the SafeArray is sized automatically by SolidWorks and the Dispatch caller can determine the size of the array by checking the upper bound of the SafeArray upon return.

Reply to
Sean Phillips

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.