Author Topic: (command) in Modeless dialogs  (Read 153 times)

Rakesh Rao

  • Member
  • *
  • Posts: 7
(command) in Modeless dialogs
« 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

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3037
    • Outside The Box
Re: (command) in Modeless dialogs
« Reply #1 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"); or to set the form's 'Event Invoke' property to asynchronous so the event handler itself runs in command context.