traversing component tree (bom)

Discussion in 'SolidWorks' started by Bates, Nigel, Aug 16, 2004.

  1. Bates, Nigel

    Bates, Nigel Guest

    anybody got some working code for generating a BOM, I have just realised
    that "component.getchidren" does not guarantee the correct component
    order. Ihave been messing around with GetFirstFeature / and
    GetNextFeature butam running out of time (and patience) seems to be too
    many cases and checks to perform. ie component folders, mates, cosmos
    entrys all get extracted from the tree.

    Just want to read out the assembly components in the correct order!

    cheers
    nigel
     
    Bates, Nigel, Aug 16, 2004
    #1
  2. Check http://dynabits.com/caddoc/ . It contains a VBA macro that builds an
    XML document, from which an HTML document (with a BOM) is generated.
    The components are extracted through the features (the only way to list them
    in the FM order)
    Please report any problem.
     
    Philippe Guglielmetti, Aug 16, 2004
    #2
  3. Bates, Nigel

    P Guest

    Logon to the SW Subscription site and peruse the API examples. There
    is a bunch of stuff there that is apropos.
     
    P, Aug 16, 2004
    #3
  4. Bates, Nigel

    JRC Guest


    Does this program work with any other browser besides IE?
     
    JRC, Aug 16, 2004
    #4
  5. JRC" wrote:
    it's a pity, but MSIE is the only browser which currently supports both
    XML/XSTL transformation and embedded SVG graphics. Both are W3C standards,
    so you should expect other browsers to support the cadML technology used in
    cadDOC in the future.

    In the meantime:

    for browsers that don't have an XSLT processor, you can check the "generate
    html files" option (right, I should then direct the browser to that hmtl
    file instead of the xml...)

    for browsers that dont' support SVG graphics, I might add an option to
    generate the graphs in a different format, but which other vector graphics
    supports hyperlinks ? Flash is the only one I can think of, but you'll need
    a license to generate flash docs...
     
    Philippe Guglielmetti, Aug 18, 2004
    #5
  6. Bates, Nigel

    JRC Guest

    The Mozilla browser supposedly has an XSLT prossesor, but it obviously
    doesn't render the pages from your site correctly.
    http://www.mozilla.org/projects/xslt/
     
    JRC, Aug 18, 2004
    #6
  7. "JRC"
    you're right, it *should* work with Mozilla...
    I have to find out (unless you know) how to make Mozilla display some kind
    of error message, since an empty page isn't very useful for debugging...
     
    Philippe Guglielmetti, Aug 19, 2004
    #7
  8. Bates, Nigel

    rocheey Guest

    Just want to read out the assembly components in the correct order!

    What do you mean by 'correct' ?
     
    rocheey, Aug 19, 2004
    #8
  9. Bates, Nigel

    JRC Guest

    Sorry, I know very little about XML. I have found that the Adobe svg
    viewer 3.x is incompatible with mozilla. You need to use the 6.x svg
    viewer instead, which adobe considers to be pre-alpha.
     
    JRC, Aug 19, 2004
    #9
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.