Jump to content

Recommended Posts

Posted

Hi Friends,

i need a lisp to select the block name called "xxx_box" from the current drawing, i need in such a way to select block only by Qselect method, please help me friends.

Posted

How about this?

 

(sssetfirst nil (ssget "_x" '((0 . "Insert")(2 . "xxx_box"))))

Posted

Awesome, its working like a charm, thank you so much rkmcswain

Posted

i need one help rkmcswain, i am doing a manual work(annotating) in following way...

1. click on the macro button from the tool bar

2. need to press the right side arrow key 5 times & hit enter key

3. then go to current modelspace & click near that block.

 

requesting to please help me on this task.

 

please let me know your requirements, can i post it as a new thread?

Posted

Back to 1st task adding a bit more auto load this

 

 

(defun pb ( bname / )
(sssetfirst nil (ssget "_x" (list (cons 0  "Insert")(cons 2  bname))))
)

 

 

To use just type on command line

(pb "Blockname")

Posted

amb2301 please explain what it is you are doing arrow 5 times ? some screen grabs maybe.

 

 

1st suggestion do item 3 1st not last.

Posted

Hi Bigal,

Thank you so much for your suggestions, as you said i just need to do screen grab(just need to select options by pressing arrow keys), i tried a similar lisp from cadtutor, but its not working, could you please help me on that

(defun c:box ()
(sssetfirst nil (ssget "_x" '((0 . "Insert")(2 . "XXX_BOX"))))
(command "Pdm")
(command "execute_settings")
(command "XXXXXX_ANNO_CNTRL")
(command "annotate")




(defun test ( ) (LM:sendkeys "{RIGHT}") (princ))
(defun test ( ) (LM:sendkeys "{RIGHT}") (princ))
(defun test ( ) (LM:sendkeys "{ENTER}") (princ))


;; Send Keys  -  Lee Mac
;; A wrapper function for the SendKeys method of the WSH

(defun LM:sendkeys ( keys / wsh )
   (setq wsh (vlax-create-object "WScript.Shell"))
   (vl-catch-all-apply 'vlax-invoke (list wsh 'sendkeys keys))
   (vlax-release-object wsh)
   (princ)
)
(vl-load-com)

(princ)
)

Posted

I think we all need to take a few steps back and for you to explain what is it your trying to do, you need to press arrows but to what ? Is it all inside some other program ?

 

PDM

PDMODE

 

Enter new value for PDMODE : what happens now ?

Posted

Hi All,

There is a third party application making AutoCAD work with a separate Spatial Database. But its API does not expose all the functions that I need which prevents me from working full blast without using interactive sendkeys.

 

My task is this: users can work with it manually but it is taking to much time so I need to automate their repetitive task of interactively clicking on each of those dialog boxes that the 3rd party application uses.

 

Third party application creates a drop down menu addition to the standard AutoCAD menu. And that drop down menu is where I am supposed to start the automation process.

 

I am trying to trigger a series of about 10 sendkeys statements which I am trying to run from lisp / VBA.

 

What I notice with said sendkeys series of statements is it seems to be able to execute the first sendkeys call as I intended it, i.e. pop out a dialog box but then the -- 2nd to the 10th sendkeys call all end up on the command line instead of going to the dialog box (popped out by my first sendkeys statement) of which I intended all the those sendkeys statements to go.

 

The command buttons are not triggerable from the command line of AutoCAD -- so I really have no choice but to try to manipulate those command buttons using sendkeys.

 

Please help me with any idea you have in mind.

Posted

Please anyone help me on this task.

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...