How to make pop up menus interactable in command line?

How to make pop up menus interactable in command line?

schmidtjBEEVY
Advocate Advocate
1,454 Views
14 Replies
Message 1 of 15

How to make pop up menus interactable in command line?

schmidtjBEEVY
Advocate
Advocate

Hello everyone,

 

I am trying to do a batch find and replace for several "find" conditions. While I realize the find and replace pop up menu is good enough for what I need, I was just hoping to be able to automate some of it. However, I cannot figure out a way to input search or replace parameters once the pop up menu pops up.

 

Also, if I understand correctly once a pop up menu appears it stops the lisp that opened it, and I was hoping to loop the find and replace going off a user input list.

 

So my question is, is there a way to make any pop up menu interactable in the command line, or is this a fool's errand? 

 

Thanks,

~JD

0 Likes
Accepted solutions (1)
1,455 Views
14 Replies
Replies (14)
Message 2 of 15

Moshe-A
Mentor
Mentor

@schmidtjBEEVY hi,

 


@schmidtjBEEVY wrote:

Hello everyone,

 

I am trying to do a batch find and replace for several "find" conditions. While I realize the find and replace pop up menu is good enough for what I need, I was just hoping to be able to automate some of it. However, I cannot figure out a way to input search or replace parameters once the pop up menu pops up.

Are we talking about FIND command?

 

Also, if I understand correctly once a pop up menu appears it stops the lisp that opened it, and I was hoping to loop the find and replace going off a user input list.

Popup menu is dialog box?

AutoLISP supports only modal dialogs, that means when a dialog is open, the connection between AutoCAD and the user is through the dialog.

 

 

So my question is, is there a way to make any pop up menu interactable in the command line, or is this a fool's errand? 

 

Thanks,

~JD


 

0 Likes
Message 3 of 15

schmidtjBEEVY
Advocate
Advocate

Hi Moshe,

Yes, I am talking about the FIND command.

I could not remember the name for the dialog box, and figured pop up menu would get someone to correct me.

 


@Moshe-A wrote:

AutoLISP supports only modal dialogs, that means when a dialog is open, the connection between AutoCAD and the user is through the dialog.

Does this mean that there is no way for me to change how AutoCAD "connects" with a user?

 

Thanks,

~JD





0 Likes
Message 4 of 15

Moshe-A
Mentor
Mentor

@schmidtjBEEVY 

 

if a dialog is open and you prefer interacting back to cmd line? you can temporary close the dialog.

 

0 Likes
Message 5 of 15

schmidtjBEEVY
Advocate
Advocate
Kind of, what I want to do is be able to interact with the dialog box via lisp commands, but as far as I am aware that is only possible through the command line. Does temporarily closing the dialog box achieve this?
0 Likes
Message 6 of 15

pendean
Community Legend
Community Legend
Greetings @schmidtjBEEVY

if you only wish to use the core commands that require pop-up to use, access to them from your keyboard is possible but very cumbersome for the average user:
1) TAB key and CTRL+TAB combo keys let you jump forward and back between dialog boxes;
2) where available, buttons with underlined letters can be accessed once you are out of an input box by just typing that letter.

Of course you could just avoid the pop-up altogether: RENAME command for example has a commandline-only version called -RENAME https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-3C68B0FF-A56F-401E-A58B-6174259252A6#:~:text=....

Enjoy.
0 Likes
Message 7 of 15

dmfrazier
Advisor
Advisor

Unfortunately (or maybe not), there is no command line version of FIND (e.g. "-FIND").

 

I think Lee Mac has a batch find lisp.

 

A search of this forum might find others who have come up with similar lisps.

0 Likes
Message 8 of 15

rgrainer
Collaborator
Collaborator

Be more specific:
Tell us exactly what words you are replacing....from and to. Are these spelling errors, or why are you having to change these words? Will these words always go from to the other always be the same?
When you say batch, what does that mean to you? Seems like you want to have some user interaction by having dialogues pop so they can be filled in? That's the way I'm reading your request. A batch routing requires no user action other than to start it running, to my use and understanding of the word batch. 

0 Likes
Message 9 of 15

schmidtjBEEVY
Advocate
Advocate
I am working with electrical drawings. In the event where a page gets removed, I need to take out wire numbers from the terminal rotation page. Our wire numbers are 6 digits long, and I usually need to do 2-3 FIND commands per page removed. The point is for the command to prompt for a number of pages, and their page numbers to loop the FIND command and change all of the wire numbers for page 15 (as an example) and replace with "SPARE". I say batch because if I need to remove more than 1 page I'm using FIND 6+ times.
What I want is to just input a list of pages, and the program will do all the FIND commands I would have done manually. I have the program lined out in notepad++, its just a matter of finding a way of using the FIND command without a dialog box stopping the rest of the program from running.
0 Likes
Message 10 of 15

schmidtjBEEVY
Advocate
Advocate
I should also mention that the wire numbers are all single line text boxes.
0 Likes
Message 11 of 15

schmidtjBEEVY
Advocate
Advocate
Thanks for the alternative @pendean, I will look more into this!
0 Likes
Message 12 of 15

schmidtjBEEVY
Advocate
Advocate
Thanks for the suggestion! I did find Lee Mac's Batch find program: http://www.lee-mac.com/bfind.html
I've been looking through it and the only thing stopping me from using it is I need to be able to use wildcard characters in the search criteria. Unfortunately, Lee Mac's program does not support wildcard searches.
0 Likes
Message 13 of 15

pendean
Community Legend
Community Legend
@schmidtjBEEVY If you are looking for ready-made 3rd party tools, look at the App store too https://apps.autodesk.com/ACD/en/List/Search?isAppSearch=True&searchboxstore=ACD&facet=&collection=&...

Message 14 of 15

rgrainer
Collaborator
Collaborator
Accepted solution
0 Likes
Message 15 of 15

schmidtjBEEVY
Advocate
Advocate
Thanks @rgrainer, I think I can adapt this to make what I need!