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

write in the command line

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I would like, through an icon, to write a letter > r < in the command line.
this is useful when required to insert the type of selection then the > r < should be written after the message already present in the command line.
This simple code does not work:
Code:
(defun c:erre (/)

(princ "r")

);; defun
Thank you.
 
thanks rpor66,
this has already been made with working icon.
the problem is that the > r < nom is written in the command line but in the text window.
In practice, for example, wanting to cut an image I have inserted and receiving the request of the mode of selection, I want to respond with a > s < to select a polyline around which the image will be cut, without using the keyboard.
Thank you.
 
Do you have to put it in a lisp list?

we put that image the pippo check
(setq pippo (car (entsel))
If you want to be sure, check a filter on the entity as I showed you the other time (ssget '(0 . "image"). .

after you will need only
(command "_imageclip" pippo "" "s")

Where's the difficulty?
 
Thank you.
I understand what you exposed me but it's not exactly what I'm looking for.
I'll explain.
If I select the command "_imageclip" >> > > > > > > > > > > > > > > > i want to reply > s < to select the cutting polyline > > > instead of pressing the key > s < by keyboard, I would like to click an icon that would do the same > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
This would apply to any dialogue with a command, for example a > r < per > relationship < in case of resize anything.
Thanks again.
 
check well, you can easily create a macro in a button (icon) with the sequence you are looking for.
in the macro uses a pause (I don't remember but it seems to be a slash \ in the command sequence)
then attention, imageclip asks you:
img selection -> then you have to give a new and only after selection s
 
I solved the problem by creating three new commands image size - rotaterif - scalarif accompanied by its new icons.
Code:
(defun c:cut image (/ image title)
(setq title "select image to cut")
(princ "\n")
(setq image (entsel title)
(princ "\n")
(command "_imageclip" image "" "s")
);

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(defunc c:ruotarif (/ title item)
(setq title "select the object to rotate")
(princ "\n")
(Sect object (in title)
(princ "\n")
(command "_rotate" object "r")
);

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

(defunc c:scalarif (/ title item)
(setq title "select the object to resize")
(princ "\n")
(Sect object (in title)
(princ "\n")
(command "_scale" object "r")
);
thanks, as always you are precise and collaborative!
 

Forum statistics

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

Members online

No members online now.
Back
Top