This command will create a basic distance joint between the specified bodies. This type of joint will simply keep 2 bodies constantly at the exact same distance from each other, as if you had attached a metal bar to each of them. The bodies will move freely but will always stay the exact same distance from each other. The BodyID1 and BodyID2 specify bodies involved and should be the integer handles of those bodies. The X and Y positions specify the world anchor locations of the imaginary 'bar' - the bodies should already be positioned so they are the proper distance apart.
Image Source: Box2D User Manual
SyntaxReturn as Integer = b2CreateDistanceJoint(ID as Integer,
Body1ID as Integer, Body2ID as Integer, X1 as Float, Y1 as
Float, X2 as Float, Y2 as
Float)