Somone who can help me find a macro I need?

Discussion in 'SolidWorks' started by theswede78, Sep 13, 2005.

  1. theswede78

    theswede78 Guest

    Hello everybody! I need a macro wich search thru a folder, finds all
    assemblys and parts in that folder. Then the macro takes the
    properties, wich are used, and export them to an excel-file or a text

    Is there anyone out there who have a macro like this i would be very
    intrested to take part of it.
    theswede78, Sep 13, 2005
    1. Advertisements

  2. theswede78

    CS Guest

    Search this group for DSOLE file. You can use this free utility
    through API to read in the custom properties really quickly from a
    folder. It has been explained many times with example code. Then
    putting the into excel isn't too hard. I would run the whole thing
    through an excel macro, Unless you have to open each part and get
    Config Specific Custom Props.

    Dim StartCell as Range
    Dim ListofProps as Variant
    Dim count as long

    startCell = Excel.activesheet.range("A1")
    count = 0
    For count = 0 to ubound(ListOfProps)
    'fill column A with the data from your Array
    startCell.offset(count+1,0).value2 = ListOfProps(count)


    CS, Sep 13, 2005
    1. Advertisements

  3. theswede78

    CS Guest

    I am sorry it isn't DSOLE it is DSOFILE.dll
    CS, Sep 13, 2005
  4. theswede78

    Luka Vilar Guest


    u don't need to open SW files just to read/write Config Specific
    Props, use SwDocumentManager (SwDocumentManager.dll located in
    SolidWorks Shared Folder)
    Luka Vilar, Sep 13, 2005
  5. theswede78

    CS Guest

    When was that added.
    CS, Sep 13, 2005
  6. theswede78

    Luka Vilar Guest

    as far as i know from ver. 2k, it's main part of SolidWorks Explorer
    (SwDocumentMgr.dl) and it's not mentioned anyware, but when i was
    working on my project i was forced to find and use it...

    When working with VERY large Assemblies it's just what u need...
    Luka Vilar, Sep 13, 2005
  7. theswede78

    theswede78 Guest

    thanks for all tips. I háven´t worked that uch with macros and dll
    files. When you say just use the SwDocumentManager.dll. What is the
    procedure to get the properties to an excel document?
    theswede78, Sep 13, 2005
    1. Advertisements

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.