7 Replies Latest reply on May 23, 2017 2:03 PM by Yoni Kaplan

    multiple instances of same part in different positions

    Yoni Kaplan

      I have spent a few days already playing around with this with no real progress. Here is my challenge:

       

      I have a part file of a camera that I need to place multiple instances (20+) of into an assembly at multiple positions relative to the origin. I need to fix it based on XYZ coordinates, angle relative to ground plane and angle relative to vertical axis. Each of the 20 instances needs unique values for each of these parameters.

       

      Long term, I need this to be automated as much as possible. To have it driven by a design table is ideal as I can use a table created by an external party to update the model without manually mating components each time.

       

      Another thought I had was to use configuration publisher to be able to drop in each camera unit and manually input the value to mates that are already defined. But this doesn't seem possible at the part level.

       

      Is this achievable? Any other techniques or tools I should be looking at?

        • Re: multiple instances of same part in different positions
          Glenn Schroeder

          Off the top of my head, I think mating one camera, then inserting the others with the "Copy with Mates" function might be a good option.  If you pin the function you can insert as many as you want while the tool is active.

           

          And if you need to edit them later you have an automatically generated table for every dimension in the Assembly that allows direct editing.  (See the post from Andy Sanders on page 30 at What are your most impressive tricks of solidworks, Please spread.)

          • Re: multiple instances of same part in different positions
            Rob Edwards

            Hi Yoni

            I would move your camera into position in the part itself(or insert into another part as an intermediate step), with a movebody/copy feature.  Just create whatever points and planes you need and configure them there.

            A design Table in the part will rapidly automate this for you.

             

            Then make an assembly from this part, fixed to origin.

            Select the part, copy, then paste in as many as you need.

            These come in unmated, just select them all and fix

            A design table in the assembly then chooses the configs for you.

            This forumla with an adjustment for the column if required does the trick

            edit: This does mean naming your configs 1,2,3.. etc and taking care with the instance ids

              • Re: multiple instances of same part in different positions
                Yoni Kaplan

                Thanks for taking the time to create this example. Can you elaborate on these two points?

                A design table in the assembly then chooses the configs for you.

                This forumla with an adjustment for the column if required does the trick

                So in your solution would there just be a single set of planes/points and the camera follows that set around OR multiple sets of fixed planes/points and the camera jumps between them? I'm trying to visualize how to set this up...

                  • Re: multiple instances of same part in different positions
                    Rob Edwards

                    Yes the Assembly DT just chooses the configuration, doing this manually is tedious.  Also just adding the parts and doing the mates is a pain.  copy/pasting the components in is the quickest way I have found to add them.  It would be great if you could do a linear pattern of parts with zero offset,, but alas.

                     

                    Yes in the part (or derived part) you just need to setup some planes, axis, a 3d sketch or whatever that you can use with move/copy bodies.

                    You configure these, and then each configuration automatically locates itself.

                     

                    When you say you need to have xyz points relative to the origin, this presents a small problem, if the dims can have +/- values.

                    You will probably have to define a bounding box and measure of these.  Easier to show than explain

                    note, i have z up and presume only positive.

                    Easier if you can have the origin in the corner, but be careful for any zero values as they can flip.  prob safer to have an offset.

                    or better just have 3 planes and have a point with 3 on plane relations, planes never flip

                     

                    Best way to translate a body is point to point, because that way you can configure the move

                    but you'll probably want to use the mate option instead/aswell so that you can orientate it to your liking

                     

                    No doubt you can achieve the same thing in a sub-assembly, and probably is a better way in your situation.  This is just a way I have worked before that I know works.

                     

                    As an example here are 100 randomly sized and orientated blobs

                  • Re: multiple instances of same part in different positions
                    Yoni Kaplan

                    I used the method you described, namely creating the configurations through a layout sketch at the part level. I still had an issue with the rotation flipping across planes so I determined where the flip was occurring and used an if/then statement in an equation to correct it.

                     

                    Thanks Rob Edwards

                  • Re: multiple instances of same part in different positions
                    Dan Pihlaja

                    Are all the instances of the camera going to be the same?

                     

                    If so, then you shouldn't need to use the configuration publisher at the part level at all.

                    You should be able to create a design table that drives all the features that you want at the Assembly level.

                     

                    2015 SOLIDWORKS Help - Summary of Design Table Parameters

                     

                    In fact, I think that, using the design table only, you can even add new instances and position them.  But I can't remember where I saw that.  If I find it, I will let you know.