How can I change the name of the image?
(defun c:test ( / )(vl-load-com)
(setq ActiveDocument (vla-get-activedocument (vlax-get-acad-object)))
;-----------------------------------------------------------------------------------------
(vla-StartUndoMark ActiveDocument) ;Start of UNDO
;-----------------------------------------------------------------------------------------
(setq *imageObj (vlax-ename->vla-object (cdr (car (entget (car (entsel)))))))
(setq *imagePath (strcase (vla-get-imageFile *imageObj)))
(setq *imageString (strcase "*tpf*"))
(setq *imageName "CorpLogo")
(if (wcmatch *imagePATH *imageString)
(progn
(vla-put-imagefile *imageObj "C:\\AutoDesk\\CAE_Custom\\AutoCAD\\Support\\Icons\\CorpLogo.png")
(vla-put-name *imageObj *imageName)
)
)
(vla-regen ActiveDocument acAllViewports)
;-----------------------------------------------------------------------------------------
(vla-EndUndoMark ActiveDocument) ;End of UNDO
;-----------------------------------------------------------------------------------------
(princ)
)
I can change the image fine but it keeps the old name, I need to update the name too...
thanks