nanoCAD Platform Help

Dialogs of the database objects

UniDialog function

UniDialog (
    [DBFLD, D, Dn, ... ,]
    [DBINF, Number,Seria,...,]
    [VFLD, rA, "A", rB, "B", ... ,]
    [BFLD, bKey1, "Key1", bKey2, "Key2",... ,]
    [RADIO, rKey1, "Version1", "Version2", ... ,]
    [VIDS, strDesignName, "Design1","Design2", ... ,]
    [TVIDS, lVidType, {"F", "T", "R", "L", "All"},]
    [VIEW, {"Vids", "Hdr", "None"}]
)		
		

The function activates the dialog to edit the standard object from the database. The function returns the IDOK, if the OK button was pressed, and the IDCANCEL, if the Cancel button was pressed.

[ ] - for optional parameters

DBFLD - keyword, after which the table's parameters are listed.

D,Dn, ... - names of the table parameters.

CAD drafting Dialogs of the database objects 0

VFLD- keyword, after which the object's parameters are listed, announced in the Public or Protected sections.

rA,rB, ... - names of parameters with the comments.

CAD software Dialogs of the database objects 1

BFLD - keyword, after which the checkboxes are listed - variables, taking only 1 (CHKD) and 0 (UNCHKD).

bKey1, "Key1",bKey2, "Key2" - names of the variables with names of the checkboxes.

A block of the parameters, starting form the BFLD keyword, is a list of the dialog's components, which are standard CheckBox(es) and has two modes: Checked and Unchecked. The parameter-variable, going after the BFLD, according to the checkbox mode takes 1 for Checked and 0 for Unchecked values. Such checkboxes are used for describing the properties of the standard objects in the application.

CAD drawing Dialogs of the database objects 2

RADIO - keyboard, after which the group checkboxes are listed - variables, taking discrete integer values.

rKey1, "Variant 1", "Variant 2", ... - names of the variables of the group checkboxes with names of selection variants.

CAD drafting Dialogs of the database objects 3

A block of the parameters, starting from the RADIO keywords, is a list of the dialog's components, which are standard drop-down lists with the permanent number of the unchanged strings. The parameter-variable, going after the RADIO, takes the index values of the selected string in the ComboBox. The top string has 0 index, the last is a subtraction of the number of strings and 1. Such checkboxes are used to select a material for the standard object in the application.

For the described example, the bCommon parameter takes 0 or 1 integer values, and the rd1 parameter takes 0, 1 or 2 values.

Parameters for the BFLD and RADIO can be described in the Public and Protected sections. Before activating the dialog, such parameters should be initialized (usually in the OnInitialization).

VIDS- keyword, after which all an object's implementations are listed.

strDesignName, "Design1", "Design2" - variable's name, storing the name of the object's implementation with the available implementations' names.

TVIDS- keyword, after which the object's views are listed.

lViewType- variable, storing the name of the object's view and taking values from the multitude {VFRONT, VRIGHT, VLEFT, VTOP, VBOTTOM,VBACK}.

"F" - view name "Frontal".

"R" - view name "Right-side view".

"L" - view name "Left-side view".

"T" - view name "Plane view".

"B" - view name "Bottom view".

"All" -names of all views.

VIEW - keyword, after which the slide's type goes from the multitude {"Vids", "Hdr", "None"}.

"Vids" - implementation's slides of the object

"Hdr" - slide of the object's header (Header)

"None" - there are no slides

Examples:

LoadInCache(dr);
UniDialog (
    DBFLD, dr,
    VFLD,
    Lthread, "thread length",
    Lhole, "hole length",
    d_hole, "hole diameter",
    VIDS, strDesignName, "All",
    TVIDS, lViewType,"All",
    VIEW, "Vids"
);
LoadInCache(Dn);
UniDialog (
    DBFLD, Dn,
    BFLD, bCommon, "General purpose",
    RADIO, rd1, "Aluminium alloy", "45 steel", "Bronze",
    VIDS, strDesignName, "All",
    TVIDS, lViewType, "All",
    VIEW, "Vids"
);
		

Custom forms

ShowForm("FormName");

Activates the object's form with the FormName name.

MessageBox function

MessageBox(StrMessage[,mb_Buttons = MB_OK, mb_Icons])

The function activates the standard Windows pop-up message.

StrMessage - message string

mb_Buttons - parameter, defining the buttons in the MessageBox.

Can take one of the following values:

MB_OK - only OK button

MB_OKCANCEL - OK/Cancel buttons

MB_YESNO - Yes/No buttons

mb_Icons - parameter, defining the icons in the MessageBox.

Can take one of the following values:

MB_ICONWARNING - warning

MB_ICONINFORMATION - information message

MB_ICONERROR - error

MB_ICONQUESTION - question

The function returns the following values according to which button is pressed:

IDOK - OK button was pressed

IDCANCEL - Cancel button was pressed

IDYES - Yes button was pressed

IDNO - No button was pressed

Example:

MessageBox("Connection error!", MB_OK, MB_ICONERROR);

Message in the notifier

ShowMessage("Text"[, npIcon, objectID]); 

Shows the notification message with the specified Text text.

npIcon can take the following values:

npSimple == -1, // without icon

npUsual == 0, // "page"

npWarning == 1, // " exclamation mark "

npCure == 2, // "cross"

npHint == 3, // "lamp"

npError == 4 //error

If the objectID was specified, the message with the button for editing the object is specified as the objecteID.

Note:

Message with the objectID cannot be sent during the insertion process or the dialog activation.

The setting "Show pop-up messages" does not affect the messages with the npError key.

ShowValue function

ShowValue(StrMessage,Value);

The function shows the values of the transferred (value) parameter as an argument, with the strMessage string to the window of the special debugger - InDebMon.exe. Any parameter or variable can be used as a value.

Example:

ShowValue("pntOrigin", pntOrigin); 
ShowValue("vecDirection", vecDirection); 
ShowValue("WorkPlane WP1", WP1); 
ShowValue("Dn", Dn); 
ShowValue("*****************", 1); 
ShowValue("OnConnect Start", 1);