OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: donnieworld on September 03, 2015, 11:52:01 AM

Title: Commandline Functions
Post by: donnieworld on September 03, 2015, 11:52:01 AM
I have a few OpenDCL projects loaded in AutoCAD and BricsCAD. The functions controlling all of the form actions are displayed in the autocomplete list of commands.

Can I modify these or implement something so they are not included in the list?

IncrementalText/FrmMain#OnInitialize
IncrementalText/FrmMain/bntCancel#OnClick
IncrementalText/FrmMain/bntOK#OnClick
...
Title: Re: Commandline Functions
Post by: roy_043 on September 03, 2015, 03:38:41 PM
If you are dealing with a modal form you can use nested (localized) functions to avoid this. I don't know how to do this for a modeless form or a palette.
Title: Re: Commandline Functions
Post by: Fred Tomke on September 03, 2015, 10:12:50 PM
Hi, these event handlers should only appear in the commandline or history list, when they are called from modeless forms with event invoke = 1 (allow command). See this topic (http://www.opendcl.com/forum/index.php?topic=1081.msg5677#msg5677) for understanding. There were even another topics in this forum about this.
You can minimize this by calling the event handler synchronously and calling another "more readable" command by using delayedinvoke.
I did it so in the past. I called different events this way from a palette: setting some variable values in the synchronously fired event handlers and finally called a command which used these variables asynchronously.

HTH, Fred
Title: Re: Commandline Functions
Post by: roy_043 on September 04, 2015, 04:13:17 AM
One of Owen's comments (http://www.opendcl.com/forum/index.php?topic=1081.msg5698#msg5698) in the topic Fred has linked to seems to suggest that you can leave out the 'c:' prefix for event handlers. This would prevent the event name from being included in the autocomplete list. But somehow this is not possible if event invoke = 1 (BricsCAD V14).

Event invoke = 1.
With the 'c:' prefix the event is sent as "(c:ModeLessTest/Form1/TextButton1#OnClicked)".
Which seems to confirm that the 'c:' prefix can be removed.
But if I remove it there is an error:
'Unable to recognize command "MODELESSTEST/FORM1/TEXTBUTTON1#ONCLICKED". Please try again.'

With event invoke = 0 the 'c:' prefix can be removed.