OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Rakesh Rao on April 23, 2021, 12:40:00 AM

Title: (command) in Modeless dialogs
Post by: Rakesh Rao on April 23, 2021, 12:40:00 AM

Dear Support,

Is it possible to use the (command...) function to call an AutoCAD (or BricsCAD) command while a modeless dialog is running. A quick cjeck and it appeared not to work. Is there any setting which would make it work?

Thanks in advance.

Best Regards
Rakesh Rao
Title: Re: (command) in Modeless dialogs
Post by: owenwengerd on April 25, 2021, 06:24:42 AM
The (command) function can only run from an existing command context. The usual solution is to create a wrapper command and run it asynchronously by calling (dcl-SendString "MyCommand\n") (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Function/SendString.htm); or to set the form's 'Event Invoke' property to asynchronous so the event handler itself runs in command context.