VB API question

Discussion in 'SolidWorks' started by Guy Edkins, Sep 30, 2003.

  1. Sean's code is correct to traverse the assembly, but don't forget
    swchildcomp.SetSuppression swComponentFullyResolved ' in case it is
    lightweight
    before calling GetModelDoc
    then you can add all the custom properties of the modeldoc, optionally using
    the result of Component2::ReferencedConfiguration to scan properties
    specific to that component's configuration.

    Now I understand that you followed a different track and already have a list
    of part documents paths. If you want to load them without making them
    active, there is a trick:
    Call SldWorks.DocumentVisible ( false, swDocPART) ' will not show part docs
    loaded after that
    Set doc=SldWorks.OpenDoc2(path,swDocPART,readonly,viewonly,silent,errors)
    Call SldWorks.DocumentVisible ( true, swDocPART)' ' will show part docs
    again
     
    Philippe Guglielmetti, Oct 7, 2003
    #21
  2. Guy Edkins

    rocheey Guest

    there were other tlb's that you were able


    The closest to the actual page of the one Im playing with is:

    www.vbbyjc.com/index.htm

    Look down near the bottom of the page for
    " OLE Structured Storage Component "

    Good Luck!
     
    rocheey, Oct 7, 2003
    #22
  3. Guy Edkins

    rocheey Guest

    AFAIK, those "custom properties" have nothing to do with the MS DSO
    well, I was amazed at how much infornation is stored there.. feature
    modification times/dates, the parasolid models themselves, the last
    few paths you've saved the document in... in poking around other
    files, like Excel, etc, theres not much there. This also explains why
    after you delete 49 of 50 configurations in a part file, the file only
    shrinks 5k or so haa haaa

    solution...

    The operative word here is 'practical', and I agree on that point.
    Quickly developing maintainable code is one of the selling points of
    VB(A), and one might get just as much a speed increase from *loading*
    the document in a 'C' routine than grabbing bytes out of a binary
    header using VB.

    But there are some times when reading the storage may be the only way,
    or the only practical way. I started doing it because, while my
    company uses derived configurations on virtually *every part* made,
    they have refused to upgrade even from 2003 sp0 to 2003 sp1 (we have
    the 2004 disks still sitting around)

    its not until 2003 sp1 that the 'isderived' function appeared...
     
    rocheey, Oct 8, 2003
    #23
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.