API performance problems

Discussion in 'SolidWorks' started by Owenreagh, Mar 15, 2005.

  1. Owenreagh

    Owenreagh Guest

    I have developed an application in Visual Basic 6.0 which performs
    various tasks on SolidWorks files via the API.

    The main tasks being:
    1) BoM analysis
    2) Configuration specific custom property reading and writing
    3) Opening / closing and saving of files

    The functions are encapsulated in a dll file, which are then in turn
    called from various VB applications

    I am experiencing problems with performance of the API outside of
    SolidWorks, i.e. the same function will run as a SolidWorks Macro in a
    second, but may take 20 or more seconds to perform the same task in a
    VB 6.0 application.

    Whilst 20 seconds may not seem excessive for an assembly, my
    application traverses all assemblies recursively to generate complete
    BoMs of all assemblies, some of which may be quite complicated. If it
    takes 20 seconds to analyse each assembly, the performance hit can be
    very noticeable.

    Is this normal or am I missing something?

    Do you have any suggestions or guidelines for speeding up the
    execution of such tasks?

    Any help would be much appreciated.
    Brian
     
    Owenreagh, Mar 15, 2005
    #1
  2. Owenreagh

    KCS Company Guest

    Sounds normal to me. The way I understand, with VB6, you're going
    out-of-process to perform in-process intensive operations. With the
    macro, you stay in-process. I think the best way to do it is with an
    add-in .dll (also in-process). Someone else, please correct me if I'm
    missing something.

    Kent
     
    KCS Company, Mar 15, 2005
    #2
  3. Owenreagh

    owenreagh Guest

    I was afraid someone was going to say that

    I did some testing and changed my app to a full in-process dll and it
    runs 30 times faster

    The reason I had it as an out-of-process exe was because the main app
    handles several different CAD applications. If it is handeling a
    Solidworks file, it uses my Solidworks DLL function library and if it
    is handeling an Inventor file, it uses my Inventor DLL function
    library, ProE etc

    I don't seem to get the same performance hit with Inventor as I can use
    the Inventor Apprentice API for slow tasks, pity there isn't a similar
    API for SolidWorks

    I am going to have to rethink the implemtation a bit.
     
    owenreagh, Mar 16, 2005
    #3
  4. Owenreagh

    That70sTick Guest

    That70sTick, Mar 16, 2005
    #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.