AnsweredAssumed Answered

How to preserve assembly mates when replacing single-body SLDPRT imported from STP with multi-body SLDPRT?

Question asked by Michael Denino on Oct 6, 2016
Latest reply on Oct 6, 2016 by Andres Lesmes

I have a large number of SLDASM files containing SLDPRT components that were originally imported to SolidWorks from another file type, for example from a STP file. As such, they have only one body feature in their feature trees.


There are about 300 of these SLDPRT files. A conservative guess puts their total occurrences in assemblies between 10,000 and 100,000 instances.


For each of these single-body SLDPRT files, there is counterpart, multi-body SLDPRT file.


I am seeking to establish a standard process for cleanly and efficiently replacing single-body SLDPRT files with their multi-body counterparts. This process must preserve or reestablish the assembly mates when the replacement occurs.


I have tried naming the mating faces & edges of one file pair prior to replacement, but that had no visible effect. I'm 99.9% certain there is no non-programmatic solution.


One concept I have is to map internal IDs of the relevant faces & edges of non-explicit features in the single-body files to their explicit counterparts in the multi-body files. But I would consider other possibilities.


I have some VBA experience, including SWX macros, but none with the SWX API. I can, however, with some effort arrange access to the API for programming purposes.


Any/all assistance would be welcome.