@BennnttPLS ,
I honestly don't know if there is a way to Properly do what you're asking for via Lisp, unless you create like a .NET solution to assist. So here is a way that I know WILL work...
...Even though it seems a bit sketchy because it Deletes points then un-deletes them, my testing could not get it to break (All of my points always remained in the dwg, even when I tried to escape the command).
My company does not currently require this workflow, but if it did, and I could not implement a .NET solution, I would feel comfortable releasing this command to my group, knowing that I have covered every base I could in preventing possible data deletion.
(defun c:TEST ( / *error* pt)
((lambda ( / C3D)
(setq C3D (strcat "HKEY_LOCAL_MACHINE\\"
(if vlax-user-product-key
(vlax-user-product-key)
(vlax-product-key)
);if
);strcat
C3D (vl-registry-read C3D "Release")
C3D (substr
C3D
1
(vl-string-search "." C3D (+ (vl-string-search "." C3D) 1))
);substr
*C3D* (vla-getinterfaceobject
(vlax-get-acad-object)
(strcat "AeccXUiLand.AeccApplication." C3D)
);vla-getinterfaceobject
*docC3D* (vla-get-activedocument *C3D*)
);setq
));eval/lambda
(defun *error* (msg)
(vla-EndUndoMark *docC3D*)
(command-s "_.UNDO" "1")
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
);if
(princ)
);defun *error*
(vla-StartUndoMark *docC3D*)
(vlax-for pt (vlax-get *docC3D* 'Points)
(if (not (zerop (vlax-get pt 'SurveyPoint)))
(vla-delete pt)
);if
);vlax-for
(vla-EndUndoMark *docC3D*)
(command "_.UNDO" "1")
(prompt "\nComplete.")
(princ)
);defun
Best,
~DD