Using accoreconsole would be the way to go there is example of modifying a directory. That is part 1.
The accoreconsole opens a dwg then runs a script, so the 2nd part is 3xburst purge save close in a script
https://through-the-interface.typepad.com/through_the_interface/2012/02/the-autocad-2013-core-console.html
I'm not sure why this would be happening since viewports are just windows into model space, so any changes to the model should automatically display in your viewports.
Are you using Viewbase or Viewedit? if so, maybe this article will help: Unable to create, edit, or update Viewbase views in AutoCAD
I don't know if this works any better, but at least for my work, it seems to be okay. Reason being is I did some experiments on DXF codes mostly dealt when using AutoCAD, so these are the codes that mostly deal with points.
(defun c:z0 (/ i ss)
(if (setq ss (ssget "_:L"))
(repeat (setq i (sslength ss))
(entmod
(mapcar
(function
(lambda (a)
(if
(member (car a)
'(10 11 12 13 14 15 16 17 18 20 21 22 23 24
25 26 27 28 31 32 32 33 34 35 36 37
)
)
(list (car a) (cadr a) (caddr a) 0.0)
a
)
)
)
(entget (ssname ss (setq i (1- i))))
)
)
)
)
(princ)
)