API: Get feature from sketch

Discussion in 'SolidWorks' started by Brian Vogel, Jun 15, 2004.

  1. Brian Vogel

    Brian Vogel Guest

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

    Thanks,

    Brian
     
    Brian Vogel, Jun 15, 2004
    #1
  2. Look up

    Feature::GetChildren

    Corey
     
    Corey Scheich, Jun 15, 2004
    #2
  3. Brian Vogel

    Brian Vogel Guest

    Ok, exactly what I need.
    Thanks.
     
    Brian Vogel, Jun 15, 2004
    #3
  4. Feature::GetParents

    See Also Example Availability

    Description

    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.
     
    Sean Phillips, Jun 16, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.