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

label xrif

  • Thread starter Thread starter Drawne
  • Start date Start date

Drawne

Guest
Hello everyone

I often happen to insert in a dwg (attachimm) many pictures. I would like to be able to display its name graphically within it, better if in a corner that does not bother, to label, without having to turn it into a block. How do I do that? Besides, can you insert multiple images simultaneously?

Thank you.
 
attack more than one image at the same time, unfortunately no one can do.
rather than using stickimm, you can drag the image from the folder to the dwg. the result is the same as attackimm.
for the label, you can insert a mtext to which you check a data field, specifically
field data, choose object, select object (image) among the various options choose name.
when you insert the next image cover the mtext with the data field, edit it (2 clicks on the text), again data field and change the object from first to second image.
It's a quicker peline to write all the texts manually, and it reduces the error on the image name to zero (it gets it by itself... )
Just take your hand.
 
Yes, but I'm not congenital. it would take a lisp to display the image label with its own name
 
My personal impression is that you haven't responded at all. then, six months ago, you well thought to throw the love of the lisp (by keeping in line, with the spirit leecher).
I tell you this because if a person has a problem and asks for help, it is because I think he wants to solve it, and he has a certain need to solve it. participate, maybe learn, propose... In short, it moves to achieve a goal (the solution).
if in six months disappear, the possibilities are reduced to 2:
the problem was not a problem - it was a vezzo;
The problem solved it.
 
I don't even know what it is and I didn't throw any love. I gladly participate when I can make a useful contribution, I am always grateful to those who promptly give suggestions to the problems exposed, I tried what was suggested to me the day itself and I saw that I was not congenital. with this does not mean that I have claimed anything and if I have not answered immediately is because maybe I have had other priorities and in the immediate I have treasured suggestions but I have left things as they were going to reserve to try again at a later time. Contrary to what you claim, mine is a spirit of experimentation on things that could be developed in some software because I invite the inventiveness of those who are better than me to improve trivial things but which could be useful for many. did the discussion expire? if you were waiting for a match you could have sent me a message in private without so many menades
 
Last edited:
In my opinion it is all to do much shorter
if one on your request tries to give you a hand the minimum of good education is to give it feedback
 
mine is a spirit of experimentation on the things that could be developed in a certain software because I invite the inventiveness of those who are better than me to improve trivial things but that could be useful for many.
great, start experimenting. What do you think that who develops in lisp was born with induced knowledge? you can learn, solve your problems and share with the community the useful improvements for many. find on the net a multitude of free manuals, tutorials, examples and videos to learn. It's not like 30 years ago when there was no internet...
 
then I want to display in the form of single row of text in the upper left corner the name without path or extension of the xrif image in my drawing: I tried to write the code below but it tells me invalid xrif name

(defun c:showxrefname ()
(setq txtheight 2.5) ; text height may be modified

;; get the user selection (must select a xref image)
(setq sel (car (entsel "\nselect a xref image: ")

;; check if a xref image has been selected
(if (and sel (eq (cdr (assoc 0 (entget sel)))) "image"))
(progn)
;; get full name of xref file
(setq name (cdr (assoc 1)))

;; check if the name is valid
(if (and name (not (equal name"))
(progn)
;; extract only the basic name of the file (without path or extension)
(setq name (vl-filename-base name)

;; get the insertion point of the xref
(setq inspt (cdr 10 (entget sel))))

;; get the x and y scale of the xref
(setq scalex (cdr (assoc 41)))
(setq scaley (cdr (assoc 42 (entget sel)))))

;; get the size of the original image
(setq imgwidth (cdr))
(setq imgheight (cdr (assoc 21))

;; verify that all properties are valid numbers
(if (and inspt (numberp scalex) (numberp scaley) (numberp imgwidth) (numberp imgheight))
(progn)
;; calculates the scaled dimensions of the image
(setq imgwidth (* imgwidth scalex))
(setq imgheight (* imgheight scaley)

;; calculate the point in the upper left corner
(setq upperleftpt (list (car inspt) (+ (cadr inspt) imgheight))

;; create the text with the name of the xref
(sing)
(list)
(cons 0 "text")
(cons 8 "0"); level
(cons 10 upperleftpt) ; insertion point
(cons 40 txtheight) ; text height
(cons 1 name) ; text content
(cons 7 "standard"); text style
(cons 72 0) ; horizontal alignment (0 = left)
(cons 73 1); vertical alignment (1 = above)
(cons 11 upperleftpt)
)
)
)
(prompt "\nproperty scale or image size invalid. "
)
)
(prompt "\nnome xref not valid or missing. "
)
)
(prompt "\nno selected xref image or invalid selection. "
)
(princ)
)

(princ "\ncomando 'showxrefname' loaded. type showxrefname to run.\n")
(princ)
 
But no, no, it was a dispassionate advice.
It was just because there is no comparison between natural intelligence and artificial intelligence.
Do you want to put mine or yours in comparison with the world warfare? you have lost in departure ..
going off-topic, I think chatgpt 4 is in subscription or wrong?
If I'm not mistaken, could you ask for compensation or not?
 
Actually, with small adjustments, it works.
does some unnecessary steps at the required end, but it works.
It's a good mental exercise.

p.s.
I left them in the empty box near the door.
 
If you log with the google account you don’t need the subscription you know. I don't work either on the 2020 I have at home or on the 2023 I have at my office. I think you're gonna have to push, dear.
 

Forum statistics

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

Members online

No members online now.
Back
Top