30.07.2013 Views

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

T-FLEX Parametric CAD. Fundamentals. 2D Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Fundamentals</strong>. Two-Dimensional <strong>Design</strong><br />

544<br />

As in the case of any control elements, the first step of creating the switch is selecting two points for defining<br />

the switch position. Next, the “Insert Variable” dialog box appears. Select the variable flag_1 from the list.<br />

The “Control Parameters” dialog box then comes up automatically.<br />

In it, you need to define the respective variable values for “On” and “Off”<br />

states. Since the variable flag_1 in our example defines the visibility level of the<br />

axes, the “On” state corresponds with “0”, while “Off” – with “-1”. In the<br />

“Caption” input box enter the string “Show Axis Lines”. We will use another<br />

“Combo Box” control for managing the dimension display options, bound to<br />

the variable dim_mode. Place this control in the “Preferences” group box. Note<br />

that, with the flag “Editable” turned off, the described combo box displays in its<br />

value field and the pulldown list the textual string portions defined in the values<br />

list of the variable dim_mode, rather than the numerical values. Put the<br />

explanation text “Dimensions:” before the “Combo Box” control, using the<br />

“Static Text” element.<br />

The remaining empty space on the dialog page can be used for placing a picture<br />

or preview pane.<br />

Let's insert a picture in the dialog, illustrating our model. Save your model as a picture, using the command<br />

“EX: Export”. After that, add the created image to the dialog page, using the command “IP: Insert<br />

Picture”, and place it in the empty group box. Use “File|Assembly|Links” command for breaking link<br />

between a picture and the corresponding file. Set “Embedded” flag for the respective item.<br />

The “Preview” element can be placed on top of the picture. To create it, select the option:<br />

Preview<br />

Specify two points defining the size and position of<br />

the preview pane.<br />

In this example, align the preview pane boundaries<br />

with those of the group box hosting the picture. The<br />

“Preview” element should fully cover the picture.<br />

From now on, when inserting this drawing as a<br />

fragment, there will be a preview pane in the dialog<br />

box.<br />

In this way, both the picture and its hosting group<br />

will be screened by the preview. However, when<br />

calling the dialog by the command "Parameters|<br />

Model", the preview pane will not appear, exposing<br />

the underlying picture.<br />

Now, all dialog controls are created. To insure that the transition from one to another control in the dialog<br />

follows the desired order (as, for instance, when using the key), we need to define the activation<br />

sequence of the control elements while working with the dialog. This can be done using the control element<br />

editing command "EO: Edit Control" described in the section “Modifying Control Elements”.<br />

Thus, the dialog creation is complete. In the course of creation, you learned how to create a dialog page and<br />

control elements for decorating the dialog box and modifying the values of the external variables.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!