The Chain Component Pattern introduced in SOLIDWORKS 2015 is a powerful tool to pattern chain links around a path. It also includes a Dynamic option to show the motion of the chain. See Chris’s chain component pattern blog post with a demonstration video.
However in order for the chain beginning and end to visually appear to line up, the path length must be correct so the number of chain links matchup. Otherwise there will be a gap if you have too few links, or overlap if you add an extra one.
Using the Belt/Chain Assembly Feature
To save yourself some time in generating the path curve, try using the Belt/Chain Assembly Feature. This can be found in the assembly environment under Insert > Assembly Feature > Belt/Chain. All you need to do is insert your sprockets into an assembly. Position them in the correct locations and allowed to rotate, but let one have a translational degree of freedom (idler sprocket). You can use a reference sketch to help mate the sprockets between its origin and the sketch lines.
Then add the Belt/Chain feature based on a pitch circle sketch contained in the sprockets. This will also allow all sprockets to rotate relative to each other with the correct ratios (select “Engage Belt”). Enable the “Driving” option and you can specify the path length. For example, I know the center-to-center distance of the links to be 20mm. I can roughly assume that the path length should be the number of links times 20, although technically not quite as the path length is the true arc length but chains are multiple straight line segments around the sprockets.
Adding a Chain Component Pattern
Then you can add the Chain Component Pattern using the Belt/Chain feature sketch and it should be a pretty close fit (as long as the sprockets have a reasonably large radius compared to the chain links).
Here is the final design with the SOLIDWORKS chain assembly feature applied correctly: