Jump to content

Customizing user input during command execution


sekarr24

Recommended Posts

Hi Friends.,

 

I need some one who guide me in creating a customization

 

The details.

 

I regularly use some input values like 800, 750, etc... during execution of commands like move, copy...,

 

I need a customization, whenever the distance value is required, a button or dialog box has to be displayed with predefined values (800,750). when i click the button those value has to be transferred to the command prompt.

 

Hope some one will answer and thanks.

 

regards

 

sekar

Link to comment
Share on other sites

Can create a new button and on Macro field input "870" - this will send to command prompt that value; unfortunately will be quite tricky to control the mouse position related to current location (and therefore displacement direction) when use that button.

 

Regards,

Link to comment
Share on other sites

You are right – but this way will have to make a button for each displacement multiplied with desired directions:

 

2 displacements (750, 800) x 4 directions (0, 90, 180, 270) = 8 buttons

 

Regards,

Link to comment
Share on other sites

Create a right-click menu with all your options, then under Mouse Options in the CUI editor, add the newly created menu to the Shift+Click or Ctrl+Click (whichever one you don't use to access the OSnap menu).

 

This will also give you the option to use it within a LISP routine.

Link to comment
Share on other sites

Just for fun, here's an option. Set your point values where I have it marked in red (I just put a few random examples).

 

The popup will display at the cursor position. :)

 

(defun c:PV (/ valLst val)
 ;; Point Values From List
 ;; DosLib Required
 ;; Alan J. Thompson, 05.21.10
 (vl-load-com)

 (setq valLst '((800 750) (0 0) (10 10)))

 (if (zerop (logand 1 (getvar 'cmdactive)))
   (alert "Must be called transparently!")
   (if (or dos_popupmenu
           (alert "DosLib required. Please download and install.")
           (progn (command) (command "_.browser" "http://www.en.na.mcneel.com/doslib.htm"))
       )
     (if (setq val (dos_popupmenu (mapcar (function vl-princ-to-string) valLst)))
       (nth val valLst)
     )
   )
 )
)

 

pv.PNG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...