Valued Mentor
370 Posts
175 Kudos
Registered: ‎05-06-2012
Post 11 of 11

Re: Finding out when a custom PaletteSet is closed in AutoCAD using .NET code cr

08-13-2012 01:25 AM in reply to: yaqiz

The solution Kean posted on his blog has a few problems.


One is that he assumes that there is an active document to send a command to, which may not be the case since the PaletteSet could be visible in 'zero-document state' (e.g., there are no documents open). In that case, kaboom.


Another problem, which affects most kludges that involve sending strings to the command line, is that the command that closes the paletteset could be scripted by LISP, and what follows that could be a prompt from LISP requesting some input. Unfortunately, Kean's solution will send its command string to the command line while the LISP script is waiting for the user to type a response, and the command string ends up satisfying the input request.


You can avoid all of the nonsense related to that solution, by trying this one (and remember that you can't assume there is any open documents when a PaletteSet is closed):


     Getting notified when a PaletteSet is hidden/closed


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!