I already know how to explode the "AcDbZombieEntity"("ACAD_PROXY_ENTITY") when the drawing is activated.
Here is the code.
(defun AEC-explode (/ adoc ss)
(setq ss (ssget "X" '((0 . "ACAD_PROXY_ENTITY"))))
(if ss
(progn
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(SSSETFIRST nil ss)
(vla-sendcommand adoc "Explode\r")
(vla-sendcommand adoc "Explode p \r")
)
)
)
I want to do this without open the drawing.And I have know how to find "AcDbZombieEntity",but I don't know how to explode.
Here is the code.
(defun c:tt( / )
(setq dbx (Vlax-Get-Or-Create-Object "ObjectDBX.AxDbDocument.18" ))
(setq path "C:/")
(foreach file (vl-directory-files path "*.dwg" 1)
(Vlax-Invoke-Method dbx 'Open (strcat path file) )
(vlax-for ob (Vlax-Get dbx 'ModelSpace)
(cond
((= "AcDbZombieEntity" (Vlax-Get ob 'ObjectName ))
(vla-Explode ob);;;;;;How to explode,this code is wrong.
)
)
)
(Vlax-Invoke-Method dbx 'SaveAs (strcat path file))
)
(vlax-release-object dbx)
)