Commandline Functions

Started by donnieworld, September 03, 2015, 11:52:01 AM

Previous topic - Next topic

donnieworld

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

roy_043

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.

Fred Tomke

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 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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

roy_043

One of Owen's comments 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.