You take the width,height and depth of the entity. You centre the entity around the 0,0,0 axis. You do this by using the fitmesh command:
FitMesh mesh,-(0.5*meshwidth(mesh)),-(0.5*meshheight(mesh)),-(0.5*meshdepth(mesh)),meshwidth(mesh),meshheight(mesh),meshdepth(mesh)
Your mesh should now be centred around the 0,0,0 axis. Now, simple Positionentity, or if you want to move the vertices instead, moveentity to your pivot point.
FitMesh mesh,-(0.5*meshwidth(mesh)),-(0.5*meshheight(mesh)),-(0.5*meshdepth(mesh)),meshwidth(mesh),meshheight(mesh),meshdepth(mesh)
Your mesh should now be centred around the 0,0,0 axis. Now, simple Positionentity, or if you want to move the vertices instead, moveentity to your pivot point.