Does anyone know whether there is a library for adding chain in onshape to attach to sprockets or if I have to create custom chain?
I’ve seen people just model “blocky” chain, where it kind of looks like a belt but just fits around the sprockets to give a general sense of where the chain will go. Modeling each chain link is probably not worth it, and will drastically increase loading and processing time for the model
Yes, there is a featurescript: “Chain Path Builder” which will make what looks like a belt.
mkCAD has a configurable chain feature as well, but similar to what ChopinWood mentioned, the resultant part looks like a belt.
You actually can generate faithful linked chain with the MKCAD Onshape app in an assembly. It slows down assemblies a good bit though.