AnsweredAssumed Answered

Complex Automated Assembly Program Workflow Ideas

Question asked by Vincent Porter on Aug 4, 2017
Latest reply on Aug 6, 2017 by Peter Brinkhuis

I am new to the forum, Solid Works and the Solid Works API.  I have worked with C++, VBA and Excel VBA.  I need some advice on a few different ways to program an assembly.


Problem:  I have an assembly that takes several hours to mate.  The assembly consists of standards parts and fasteners.  One assembly could be up to a few hundred standards parts and several hundred fasteners.  But, the assembly is mated in a logical pattern with the parts and fasteners.  This is a very tedious process.  One issue is that if the engineer making the assembly doesn't follow the same pattern when I export the assembly and import it into another program (MATLAB) the import is disorganized and difficult to manipulate. 


Example:  Assumed mate Part A to Part B, but engineer mates Part B to Part A...  All the export variables will change sign and because of the large number of mates the probability of mating order error is large.  Even if the error percent was 0.1% per mate after mating 100 parts the error probability would be 9.5%.  That is roughly 1 in 10 exports will have inverted signs.  And finding the errors is very difficult and time consuming.


Workflow Ideas

  1. I am not set in stone on using a program.  If I can accomplish the tasks in a logical repetitive order while assembling the parts and fasteners and in a timely fashion I would not spend the time to write a program
  2. Engineer loads all the necessity assembly parts to the assembly model.  Created a user form where the engineer selects and stores the components, faces, and edges to be mated.  Then the program mates the parts to the fixed part in the assembly and then copies the components for the next iteration of mating and references the new components, faces and edges based on the engineer's original selection.  This program would loop thru the assembly iterations until the desired assembly is created.
    1. Created User Forum and can access it thru running a macro.  Would be nice to attach it to a button and put it into an add-in to be distributed to the engineers.
    2. Worked out prompting engineer to select the mate face/edge.  Need some information on how to effectively store the component, the body, the entity from the selected face/edge.  Might need to change the edge property so I can find the face/edge again after storing and copying.
    3. Need information to how to copy the components and select for mating
      1. I have the old component stored so creating a new one shouldn't be an issue (Assuming, Need to find an example)
      2. I have the old component face/edge stored I hope I can compare the old face/edge to the new faces/edges and find the same face/edge on the new component
      3. I need some help navigating thru the different objects of a components.
        1. Component to Body to Face/Edge to Entity and Select for mate.


Any ideas and help would be greatly appreciated