Discussion forum
CAD discussion |
Please abide by the rules of this forum.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
How can AutoLISP deal with Dialog boxes? |
Post Reply |
Author | |
AndreasZ
Newbie Joined: 08.Jan.2024 Location: Germany Using: AutoCAD 2013 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 08.Jan.2024 at 22:36 |
Hi everyone, I want to automate a task using AutoLISP, but when I call "(command (AMPARTREF <Position>" etc..., a dialog box will pop up, interrogating me about some properties that I don't need . To get past that dialog, it seems I need to pass a <TAB> keystroke to AutoCAD. - Is there a way to do this - similar to "" meaning <ENTER> or (command()) meaning <ESC>? - Btw. the command AMPARTREF doesn't come with a hyphened variant (version is AutoCAD 2013). - Or can I somehow suppress the dialog with some setting? Thanks!
Edited by AndreasZ - 08.Jan.2024 at 22:40 |
|
Kent Cooper
Senior Member Joined: 12.Mar.2013 Location: United States Using: AutoCAD2020, 2023 Status: Offline Points: 629 |
Post Options
Thanks(1)
|
(AMPARTREF) must be a custom function such as one built into an overlay program -- it's not part of regular AutoCAD. So someone without that overlay program [like me] won't be able to try anything. Generally, AutoLisp (command) functions won't take anything but native command names and their arguments, so this part:
(AMPARTREF <Position> .... [with whatever follows] would need to feed back out to the (command) function an AutoCAD command name or input to such a command if you're already in it. That would mean you can't get around whatever the (AMPARTREF) function needs you to do. You would probably need to make an altered definition of the function without the asking for unneeded properties, or find another way to accomplish the task [I can't suggest anything without an idea what (AMPARTREF) does].
|
|
AndreasZ
Newbie Joined: 08.Jan.2024 Location: Germany Using: AutoCAD 2013 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thank you for answering! Well the version I'm using is called "AutoCAD mechanical", maybe that's one of those overlay versions. "AMPARTREF" creates reference points that connects objects to the item list.
In the meanwhile I found out that "CMDDIA" seems to turn of the dialog box, so I'm one step further... Wish me luck and have a nice day
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,314 seconds.