API XML Stream and SW (swDocMgr)

Discussion in 'SolidWorks' started by Guy Edkins, Sep 29, 2005.

  1. Guy Edkins

    Guy Edkins Guest

    Hey crew,

    Been doing alot of head banging with the SwDocumentManager of late. Trying
    to make an acceptable structured quantified BoM from the XML stream SW gives
    you. Just when I think I have cracked the schema there is yet another
    wrinkle in it. Example:

    <swModel id="6942" swName="9140-00604" swConfigurationName="Default"
    swConfigurationId="0" swLastModifiedStamp="117" swConfigurationFlags="384"
    swFileRef="6943" swAssemblyFeatureEffectedComponents=""/>
    <swModel id="6945" swName="9140-00605" swConfigurationName="Default"
    swConfigurationId="0" swLastModifiedStamp="117" swConfigurationFlags="384"
    swFileRef="6946" swAssemblyFeatureEffectedComponents=""/>
    <swModel id="6950" swName="0190-04220" swConfigurationName="M6 X 45 LNG"
    swConfigurationId="695" swLastModifiedStamp="137" swConfigurationFlags="384"
    swFileRef="33"/>
    <swModel id="6958" swName="0190-04260" swConfigurationName=""
    swConfigurationId="-1" swLastModifiedStamp="280" swConfigurationFlags="384"
    swFileRef="384"/>

    9140-00605 is an assembly, beats me what reports to it based on the stream.
    Anyone have any tools they have devised to successfully parse the SW XML
    stream into say a tab delimited indented BOM? Tips freely accepted!

    XML is actually easy but this is getting really old.


    TIA
     
    Guy Edkins, Sep 29, 2005
    #1
  2. Guy Edkins

    GreenHex Guest

    Are you using VB.NET? or VBA with the newer office versions?

    It's all actually trivial to load the XML file into a DataSet/
    DataTable and then you can do anything you want... SQL, Excel,
    HTML. pdf... you name it and you can convert the DataSet/
    DataTable...

    With regards,

    Vinodh Kumar M.
    www.swCP3.com
     
    GreenHex, Sep 29, 2005
    #2
  3. Any code examples available how to use SWDocumentManager?
     
    Markku Lehtola, Sep 30, 2005
    #3
  4. Guy Edkins

    Guy Edkins Guest

    The SwDocMgr API help file has some very nice examples of use. Need a copy?

    Guy
     
    Guy Edkins, Sep 30, 2005
    #4
  5. Hello Guy-

    "The SwDocMgr API help file has some very nice examples of use." Where is
    this located? I can't find it.

    Best Regards,
    Devon T. Sowell
    www.3-ddesignsolutions.com
     
    Devon T. Sowell, Oct 2, 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.