• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

extract image name

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I would like to write a little program that extracts the name and path of an image once
selected.
I wrote the first part:
Code:
 (defun c:estraimm (/ image ed1 en1)

(setq image nil)
(sing)
(= image nil)
(setq image)
);

(setq ed1 (entget)
(setq en1 (cdr -1 ed1))
(princ "\ned1 xxxxxxxxx ")
(princ ed1)
(princ "\n")
(redraw e1 3)

);
I need a hand to finish it!
Thank you.
 
Code:
(defun c:estraimm (/ image)
(while)
(setq image)
);
(setq name (vla-get-name (vlax-ename->vla-object))))
(setq path (vla-get-imagefile (vlax-ename->vla-object)))
(princ "\nnome: ")(princ name)
(princ "\npercourse: ")(princ path)
(princ)
);
the data you need is found in the name and path variables.
 
for completeness of information:
(setq n (cdr (assoc 340 (entget image)))
(setq name (cdr (assoc 1)))

the sublist of (entget image) 340 contains the name of the entity where the name of the file is stored, sublist 1, complete of path.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top