Jump to content

Recommended Posts

Posted

Hello all,

 

I've tried to get some help with this in the past and haven't been able to achieve what I'm after. I think overcomplicated it before. Can you manipulate a dialog box (proper term may be user interface?) with lisp? I have custom commands that bring up a dialog box with various options that I would like to automate some things.

 

When the box comes up, I can use "SHIFT+TAB" to cycle to the option I want, hit enter to then select an object and hit enter one more time to bring the box back up to change various things. Can lisp do all this?

 

 

Thanks again,

 

-Nobull

Posted

I know that one can accomplish a lot when pairing LISP + DCL, but I am not sure what level of detail one can implement on-the-fly in the same manner that one could in another API (I skipped DCL for WPF)... Perhaps you could be more precise about exactly what you're attempting to do, and provide (anonymized?) code so that others aren't forced to recreate a scenario fro scratch in order to attempt an effort to help?

 

Cheers

Posted
I know that one can accomplish a lot when pairing LISP + DCL, but I am not sure what level of detail one can implement on-the-fly in the same manner that one could in another API (I skipped DCL for WPF)... Perhaps you could be more precise about exactly what you're attempting to do, and provide (anonymized?) code so that others aren't forced to recreate a scenario fro scratch in order to attempt an effort to help?

 

Cheers

 

Thanks for the response. I tried specifics last time too and I may have overcomplicated (or undercomplicated) it and most were lost with my true intentions. I have programs within my CAD that my company paid for that I cannot share but I can try to explain. I've been working with macros too, trying to automate some things but you can't manipulate a user interface with these. I can myself create a lisp that invokes the command but I get stuck after that. When the command is entered, a dialog box comes up with various options. This command creates steel beams. You can choose a designation, among other options, and draw beams in a plan view (the beam is drawn as sort of a polyline but with different attributes). I'm trying to automate the editing of the beams with a simple double-click. I can accomplish the double-click feature with macros once I figure out how to enable the editing mode of this command via a lisp or otherwise.

 

In a normal setting when editing a beam: you enter the command; click the edit button; select your beam; adjust whatever you want; and finally confirm the changes.

 

I want to end up with: double-click the beam; type the new designation; enter.

 

With all the revisions we have to deal with, this could be helpful but I feel with my lack of knowledge with lisp and inability to share in too much detail, this may not happen. And unfortunately I have no code to speak of. I guess what I'm after is some explanation of how to enter keystrokes via lisp or some way to deal with a user interface without having to click using the mouse (because then I can automate things further)

 

*phew* Hopefully, all that makes some lick of sense to someone but I can try to reiterate if needed.

 

Thanks again,

-Nobull

Posted
Thanks for the response. I tried specifics last time too and I may have overcomplicated (or undercomplicated) it and most were lost with my true intentions. I have programs within my CAD that my company paid for that I cannot share but I can try to explain. I've been working with macros too, trying to automate some things but you can't manipulate a user interface with these. I can myself create a lisp that invokes the command but I get stuck after that. When the command is entered, a dialog box comes up with various options. This command creates steel beams. You can choose a designation, among other options, and draw beams in a plan view (the beam is drawn as sort of a polyline but with different attributes). I'm trying to automate the editing of the beams with a simple double-click. I can accomplish the double-click feature with macros once I figure out how to enable the editing mode of this command via a lisp or otherwise.

 

In a normal setting when editing a beam: you enter the command; click the edit button; select your beam; adjust whatever you want; and finally confirm the changes.

 

I want to end up with: double-click the beam; type the new designation; enter.

 

With all the revisions we have to deal with, this could be helpful but I feel with my lack of knowledge with lisp and inability to share in too much detail, this may not happen. And unfortunately I have no code to speak of. I guess what I'm after is some explanation of how to enter keystrokes via lisp or some way to deal with a user interface without having to click using the mouse (because then I can automate things further)

 

*phew* Hopefully, all that makes some lick of sense to someone but I can try to reiterate if needed.

 

Yes, that clarification helps me to better understand a great deal, as I have not seen your other thread.

 

It also immediately brings me to a common frustration for LISPers; one cannot manipulate native AutoCAD, nor most (not necessarily all; more on that below) 3rd party dialogs. This is primarily due to the languages used to develop said dialogs; typically being .NET languages such as C#, F#, VB, etc. or an even higher level language such as ARX (C++ for AutoCAD), CRX, DBX, etc. Point being, these are generally implementing stored settings, either those persistently stored to Registry, XML, etc. and instantiated using Class-level Fields, Properties, etc. and then stored persistently when the application is terminated (if you in any way grasp Object-Oriented principles).

 

That said, this can be a blessing, or a curse for a LISPer... As if you can identify where the persistent settings are stored, you can manipulate them, however, the crux being that you may not be able to get the loaded application to acknowledge said changes and update the instantiated Fields, or Properties.

 

[Edit] - And that's IF the 3rd party developer went to that level of detail, as some forms have default settings that result from their constructor(s), that are used each time the form is shown.

 

Does this make (more?) sense?

Posted

Since your company paid for the 3rd party application in the first place, maybe they would see the wisdom in making the changes you wish to make. In that case have the 3rd party developer institute these changes/updates in the code for all in your company to take advantage of. You have given no indication just what type of functions you wish to update, .net, .lsp or type of user interface ie; .dcl files, .net forms etc., seems like having the original code developer help you out here would be the best approach.

Posted

You have to understand that while the dialog is on screen you

cannot pick anything from the screen. Only interactions

is via the action_tile.

 

Normally you would need to save the status of all tiles, hide the dialog, pich the entity

then restart the dialog with settings as per the saved status of all the tiles.

 

This is accomplished by putting the dcl handling portion of your autolisp

program in in a loop.

 

Search for hide dcl, I believe Kenny Ramage has a tutorial on it at Afralisp.

 

It may opened some paths to solutions.

 

ymg

Posted

Thank you all for the responses. They were kind of what I was expecting as well; that I would need access to the dcl files, which I'm not sure of the location. And for the couple of tweaks I'm trying to accomplish, they are rather minor. Little timesavers is what I'm always hunting. But sometimes I need to look at time invested and what the end result is actually worth. I may have to cut losses with this one. Thank you all again for the help.

 

-Nobull

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