API: Getting view or model referenced by New BOMtable

Discussion in 'SolidWorks' started by CS, Dec 17, 2004.

  1. CS

    CS Guest

    I can't find any way to figure out which view is referenced by the new bom
    table. I first thought it would be an object of the view that was selected
    when it was created but it seems that it is a part of the sheet view. My
    goal is actually to access the model that is referenced through the bom. I
    see there is a way to get the config or configs that are referenced but
    nothing for the Model or the View that are referenced. Anyone?

    Corey
     
    CS, Dec 17, 2004
    #1
  2. Have you tried using the BOM.GetFeature? I haven't tried it, but you might
    be able to then get the name of the feature. Could that feature be the
    model or view?

    Evan
     
    Evan T. Basalik, Dec 22, 2004
    #2
  3. CS

    CS Guest

    This is the debug string I got from the following

    Set bomf = ThisAnnotation.BomFeature
    Set feat = bomf.GetFeature
    Debug.Print feat.Name

    Bill Of Materials1

    so it appears that BomFeature is only giving access to the Feature object of
    the Bom

    Though earlier I tried Feat.getparents and it came up with one object but
    when I tried to use it as a view I got a type mismatch.....OOOOHHH.....

    Ahhhh....I passed the object to a feature and it's name is the referenced
    model. Thank you Evan for invoking this thought process.

    Corey

    "Evan T. Basalik" <Evan(do not dare spam me -
    remove)> wrote in message
     
    CS, Dec 22, 2004
    #3
  4. CS

    CS Guest

    Darn it. After looking closer I found that the feature returned as the
    parent feature is the drawing itself (Which is in this case the same as the
    model.) Using it would be a safe bet for most of our drawings but I don't
    want to rely on most of the time. I may resort to using the view specified
    in sheet props until I can find a clean way of getting the View used to
    create the BOM.

    Corey
     
    CS, Dec 28, 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.