Check validation - Intergraph Smart 3D - Help

Intergraph Smart 3D Common

Language
English
Product
Intergraph Smart 3D
Subproduct
Common
Search by Category
Help
Smart 3D Version
13
  1. Select the control at C, and open the Events window.

  2. Type the value for Load as sp3DUOmCtrl11_Load in the Events window. You can select this value from the list.

    Check the name of the control, and type the values accordingly. In this case, the control at C is sp3DUOmCtrl1. Check the controls with your form, and type the values accordingly (sp3DUOmCtrlxxx).

  3. Type the value for ValidityProperty as sp3DUOmCtrl1_ValidateProperty in the Events window, and press ENTER.

    You are automatically directed to the Coding page.

  4. On the Coding page, type the following: MessageBox.Show("Value acceptable");

  5. For the control at D, type the following code:

    try

{

UserControl oCntl = (UserControl)sender;

if (oCntl != null)

{

double odblVal =System.Convert.ToDouble(e.NewPropertyValue);

if (odblVal < 0.5)

{

MessageBox.Show("Value should be > 0.5");

e.SuccessfullyValidated = false;

}

else

{

e.SuccessfullyValidated = true;

}

}

}

catch (Exception)

{

e.SuccessfullyValidated = false;

}