This is Python, but it's ActiveX, so you should be able to follow along
#AXDBLib.AxDbDocument
def PyRxCmd_doit():
try:
dbx = AxUt.getDbx()
dbx.Open("e:\\example.dwg")
minpt = (99999,99999,99999)
ent : Ax.IAcadEntity
for ent in dbx.ModelSpace:
minmax = ent.GetBoundingBox(None,None)
minpt = min(minmax[0],minpt)
for ent in dbx.ModelSpace:
ent.Move(minpt,(0,0,0))
dbx.SaveAs("e:\\example2.dwg")
except Exception as err:
traceback.print_exception(err)