API: Copying an Assembly and Replacing its Child Components in the Copy (VBA)

Version 6

    This VBA example shows how to use an assembly document and its child component documents as a template. It shows how to copy the assembly to a copy in another folder location and replace and update all of the component documents with new names and updated references.

     

    First it copies the assembly document to a different name/location. Then it loops through the child components and uses IAssemblyDoc::ReplaceComponents to update the child component references to the new document location. If you also want to rename the child components within the assembly structure, please see the API download example, "An example of renaming components".

     

    Note:

    - Subscription Services required for full access.

    - Looking for more API Examples?

     

     

    Copyright © 2011 Dassault Systèmes SolidWorks Corp. All rights reserved.
    Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.