Problem with FeatureManager::FeatureCut function in API

Discussion in 'SolidWorks' started by LazerSlug, Jul 29, 2005.

  1. LazerSlug

    LazerSlug Guest

    Hi, this is my first post. I am very new to Solidworks, but I am an
    experienced programmer. I've been developing a small add-in for
    Solidworks 2005 SP3 with VB.NET, and I think I've found a deficiency in
    the FeatureCut function.

    When you do a cut-extrude from a sketch, you have the option of
    changing where you are cutting "From"; the options in the pulldown menu
    are Sketch Plane, Surface/Face/Plane, Vertex, and Offset. Using the
    offset option you can create a feature cut that does not necessarily
    intersect with your sketch plane.

    The problem I have is that the FeatureCut function in the API doesn't
    appear to support this part of Cut-extrude (or maybe it does and I
    can't figure it out). Could anyone describe how I could accomplish
    this same effect through the API? Perhaps the sketch plane could be
    translated before calling FeatureCut, but I have no idea if this is
    possible. I would greatly appreciate any advice.
     
    LazerSlug, Jul 29, 2005
    #1
  2. LazerSlug

    TOP Guest

    SW does not always put all the GUI functionality into the API. If you
    have searched through help, SW API support on their site, etc. you can
    also send a request for help to SW through your VAR. They can clarify
    this if nobody else here can.

    Also, record a macro while doing this. If it can't reproduce it the
    chances are high that the functionality is not there.
     
    TOP, Jul 29, 2005
    #2
  3. LazerSlug

    CS Guest

    I think you are miss interpreting the operation. It offsets the
    selected surface and that offset becomes the end condition for the cut.
    It still intersects the sketch plane. You can do this through the api
    using FeatureCut you have to supply the correct parameters though

    Something like

    Set Cut = FM.FeatureCut(True, False, False, swEndCondOffsetFromSurface,
    swEndCondBlind, 0, 0, False, False, False, False, 0, 0, False, False,
    True, False, False, False, True)

    this also requires pre-selection and the selections must be made in the
    correct order. I believe sketch then surface

    Regards,

    Corey
     
    CS, Jul 29, 2005
    #3
  4. LazerSlug

    CS Guest

    Another note: The FeatureCut method has a ton of parameters but
    depending on the type of cut you are doing some of them don't actually
    mean anything. I don't know why they don't make them optional It sure
    would clean up the code a bit if you could specify the parameters you
    need.

    Corey
     
    CS, Jul 29, 2005
    #4
  5. LazerSlug

    Tin Man Guest

    You probably can do this by incorporating the actual "Offset From"
    entity as one of the user (pre?)selections before calling your code to
    perform the cut, and then inserting that selection in the
    correct/appropriate location as CS described.

    Ken
     
    Tin Man, Jul 31, 2005
    #5
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.