12.12.2012 Views

gPROMS ModelBuilder version 2.3.1

gPROMS ModelBuilder version 2.3.1

gPROMS ModelBuilder version 2.3.1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

By clicking on the check syntax button just under Tools on the top toolbar.<br />

By selecting Check Syntax from the Entity menu.<br />

Right clicking on the Entity and selecting Check syntax.<br />

By using the keyboard short-cut (F4).<br />

9<br />

Entity editors<br />

If <strong>ModelBuilder</strong> finds an error, as shown in Figure 2.4, a small pane appears just underneath the text editor reporting<br />

the error. Double-click the error message in the error pane and the cursor will automatically go to the<br />

corresponding line number to show where the syntax error is.<br />

You will also see that the error is highlighted in the text editor window and that a red cross appears through the icon<br />

for the Entity in the Project tree. Correcting this error will then cause this cross and the error pane to disappear.<br />

2.2.2.3 Assisted pathname completion<br />

Most <strong>gPROMS</strong> language entity editors support pathname completion. The pathname completion applies to all the<br />

Units, Variables, Parameters, Selector names and values and Distribution Domains declared in a specific Model and<br />

all its sub-models, as well as cross-referenced entities. Note that pathname completion only works on entities that<br />

have been validated by a syntax check (F4) - see Section 2.2.2.2) and its suggestions are limited to variable names<br />

etc. which were defined at that time.<br />

Auto-completion is invoked manually by pressing Ctrl + Space or automatically following a small delay after typing<br />

the name of a Unit followed by dot. When invoked, a list box shows all the possible Units and Variable names for<br />

completion (see Figure 2.5). Typing additional characters will narrow down the selection as the partially typed word<br />

matches the appropriate Unit or Variable name. However, once a unique Unit or Variable name exists, the pathname<br />

will be automatically completed. The user may also use the cursor key to navigate around the list box. Pressing the<br />

“Space” or “Enter” key at any time will select the Unit or Variable name to replace the partially entered name. On the<br />

other hand, pressing the “Escape” key will close the list box without completion.<br />

The user also has the option to disable or delay the pop-up list box by changing the default setting in the Entity<br />

Editor category in the <strong>ModelBuilder</strong> Preferences menu (see section 9.2). Once this option has been disabled, the<br />

user can only manually invoke the list box by using the Ctrl + Space short-cut keys.<br />

2.2.2.4 Word Match<br />

This is similar to automatic pathname completion in that it completes the current word being typed. However, it<br />

does not require a valid syntax check to be used and applies to any word that may have previously been typed (not<br />

just Units, Variables, Parameters, Selector names and values and Distribution Domains). For example, it can be used<br />

to auto-complete <strong>gPROMS</strong> language key words, such as WITHIN, SWITCH, END, etc.<br />

Word match is invoked manually by pressing:<br />

Ctrl + K to find the previous word that begins like the current word and complete it so that they match.<br />

Ctrl + L to find the next word that begins like the current word and complete it so that they match.<br />

As well as completing the word, word match will also match the case. This is particularly useful for <strong>gPROMS</strong><br />

language keywords where it is usually preferred to have the whole word in upper case.

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

Saved successfully!

Ooh no, something went wrong!