ObjectDCL Banner

Form_Enable Method

Description

This method will disable or enable a dialog box, or config tab (but not the dockable form) to be enabled or disabled.

Parameters

MyDialogReference
Reference to the dialog.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
Enabled
Boolean identifying the state to apply. T is for enabling. Nil is for disabling.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the form is not found or the form does not support the operation.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Form_Enable 
		MyDialogReference [as Reference]
		Enabled [as Boolean])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Form_Enable
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		Enabled [as Boolean])

Remarks

Does not work for the Dockable form or the FileDialog.

When using this call with a Modal dialog box ensure you have the means re-enable the dialog box otherwise AutoCAD will be permantly locked.

Applies For

ConfigTab, Modal, Modeless.

Example

CopyCode imageCopy Code
; Enable the dialog
(Odcl_Form_Enable MyProject_MyForm 1)

See Also

Form_Close, Form_IsEnabled, Form_Hide, Form_Show