Tutorial Toolkit Function Descriptions > User Interface > General
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
General
 
uid_get_screen_info
( xpix, ypix, width, height, dpi )
Description:
Return the setting of screen size in pixels and pixels per inch.
Input:
none
Output:
INTEGER
xpix
The number of pixels in the x screen direction.
INTEGER
ypix
The number of pixels in the y screen direction.
INTEGER
width
The pixel width of the screen.
INTEGER
height
The pixel height of the screen.
INTEGER
dpi
The number of dots (pixels) per inch in the x direction.
Error Conditions:
14000199
LpGeometryText: there isn’t enough room to build the output string.
Example:
Please see uid_get_screen_info (p. 362) in the MSC Acumen Toolkit - Code Examples.
 
uid_get_border_sizes
( type, pos_is_frame, leftoffset, topoffset, rightoffset, bottomoffset )
 
Description:
Return the value of positionIsFrame and the size of the borders in all four directions for a specific type of window.
Input:
INTEGER
type
Window type:
0=dialog
1=graphics
2=modal
Output:
LOGICAL
pos_is_frame
Setting of PositionIsFrame.
INTEGER
leftoffset
Size of left border.
INTEGER
topoffset
Size of top border.
INTEGER
rightoffset
Size of right border.
INTEGER
bottomoffset
Size of bottom border.
Example:
See example for uid_get_screen_info, 130. See also uid_get_border_sizes (p. 359) in the MSC Acumen Toolkit - Code Examples
 
uid_get_font_heights
( font_ht, textfont_ht, spreadfont_ht )
 
Description:
Return font heights.
Input:
none
Output:
INTEGER
font_ht
Font height in pixels.
INTEGER
textfont_ht
Text font height in pixels.
INTEGER
spreadfont_ht
Spreadsheet font height in pixels.
Example:
Please see uid_get_font_heights (p. 361) in the MSC Acumen Toolkit - Code Examples.
 
uid_set_sys_pix
( pix_per_inch, new_disp_factor )
Description:
Calculate system dimensions.
Input:
REAL
pix_per_inch
Set monitor pixels per inch.
REAL
new_disp_factor
Set the display factor.
Output:
none
Example:
See example for uid_get_font_heights, 131. See also uid_set_sys_pix (p. 363) in the MSC Acumen Toolkit - Code Examples.
 
uil_app_analysis.get_real_name
( user_name, real_name )
Description:
Get the current preference from the database.
Input:
STRING
user_name[]
The current analysis code or type name. See db_get_default_anal_code.
Output:
STRING
real_name[]
The modified analysis code or analysis type name.
Example:
Please see uil_app_analysis.get_real_name (p. 364) in the MSC Acumen Toolkit - Code Examples.
 
uil_pcntcomplete.close
()
  
Description:
This function closes the percent complete form in the MSC.Patran window. The function has no return value.
Input:
None.
Output:
None.
Error Conditions:
None.
Example:
Please see uil_pcntcomplete.close (p. 365) in the MSC Acumen Toolkit - Code Examples.
  
uil_pcntcomplete.initlz
(<label>)
Description:
This function starts the percent complete status form in the MSC.Patran window. The function has no return value.
Input:
STRING
label []
The label for the percent complete form.
Output:
None.
Error Conditions:
None.
Example:
Please see uil_pcntcomplete.initlz (p. 366) in the MSC Acumen Toolkit - Code Examples.
 
uil_primary.get_menubar_id
( )
Description:
Returns the widget id of the main menu bar
Input:
none
Output:
widget
<Return Value>
Value of the main menu bar id.
Example:
Please see uil_primary.get_menubar_id (p. 366) in the MSC Acumen Toolkit - Code Examples.
 
ui_sys_command
( cmd )
 
Description:
 
 
Can be used to create new files outside the MSC.Patran environment, or perform any other unix task in the invoking window.
Input:
STRING
cmd[]
Unix command.
Output:
LOGICAL
<Return Value>
True- Unsuccessful. False- Successful.
Example:
Please see ui_sys_command (p. 348) in the MSC Acumen Toolkit - Code Examples.
 
ui_sys_return
( )
Description:
Return out of the event loop. This will cause the application to return to the operating system command line.
Input:
none
Output:
none
Example:
Please see ui_sys_return (p. 349) in the MSC Acumen Toolkit - Code Examples.
 
ui_text_select
( textwid, left, right, vstr )
Description:
Return selected text and it’s left and right positions in the string in which it resides.
Input:
widget
textwid
The widget ID.
Output:
INTEGER
left
Left position.
INTEGER
right
Right position.
STRING
vstr[ ]
This value returns the text selected in the textbox. See the notes below.
 
Note:  
This string must be allocated with enough characters to contain the entire string. If enough characters are not allocated, the text box string returned by this function will be truncated.
A string with enough characters to contain the selected text can be allocated with a call to the ui_wid_get_vstring () function as shown in the example.
Example:
Please see ui_text_select, 349 and ui_text_select (p. 351) in the MSC Acumen Toolkit - Code Examples.
 
ui_wid_exit
( )
 
Description:
Call the exit function for all displayed windows.
Input:
none
Output:
none
Example:
Please see ui_wid_exit (p. 353) in the MSC Acumen Toolkit - Code Examples.
 
ui_wid_hide_forms
( parm )
Description:
Call the hide all function for all displayed windows to hide all the displayed windows. Used for applications such as Insight which need to hide all the forms with one call.
Input:
STRING
parm[]
“ALL”, “NONGRAPHICS”, “NONMODAL”, “MODAL”, “GRAPHICS”, “DB” .
Output:
none
Example:
Please see ui_wid_hide_forms (p. 354) in the MSC Acumen Toolkit - Code Examples.
 
ui_exec_command
( cmd )
Description:
Invokes a MSC.Patran command.
Input:
STRING
cmd[]
Command to be invoked.
Output:
none
Example:
Please see ui_exec_command (p. 332) in the MSC Acumen Toolkit - Code Examples.
 
ui_form_delete
( class )
Description:
Delete the form defined in the given group.
Input:
STRING
class[]
Form’s group name.
Output:
 
 
none
 
 
Example:
Please see ui_form_delete (p. 332) in the MSC Acumen Toolkit - Code Examples.
 
ui_form_exists
( class )
Description:
This function will determine if a form has been initialized.
Input:
STRING
class[]
This value specifies the name of the class that implements the form.
Output:
LOGICAL
<Return Value>
TRUE if the given groupname has been initialized.
 
Note:  
This function will work only with forms that are created throug a call to ui_form_create () made in an init function that is a member of the class of functions represented by the input value class. In all other cases this function will return FALSE.
Example:
Please see ui_form_exists (p. 334) in the MSC Acumen Toolkit - Code Examples.
 
ui_form_is_displayed
( class )
 
Description:
This function will determine if a form is currently being displayed.
Input:
STRING
class[]
Name of the class to be searched for in the list of currently displayed forms.
Output:
LOGICAL
<Return Value>
TRUE: The class form is currently displayed.
FALSE: The class form is NOT displayed.
 
Note:  
This function will work only with forms that are created through a call to ui_form_create () made in an init function that is a member of the class of functions represented by the input value class. In all other cases this function will return FALSE.
The value specified for the input argument class is case sensitive. If this function does not behave as described, try changing the case of the name passed with that argument.
Example:
Please see ui_form_is_displayed, 336 and ui_form_is_displayed (p. 338) in the MSC Acumen Toolkit - Code Examples.
 
ui_graph_create
( parent, name, x, y, width, height )
 
Description:
Create a graphics widget.
Input:
widget
parent
Pointer to the parent widget.
STRING
name[]
Name of the graphics widget.
REAL
x
X location.
REAL
y
Y location.
REAL
width
Widget width.
REAL
height
Widget height.
Output:
widget
<Return Value>
Pointer to the new widget.
Example:
Please see ui_graph_create, 343 and ui_graph_create (p. 344) in the MSC Acumen Toolkit - Code Examples.
 
ui_is_initialized
( )
Description:
Check to see if the user interface has been initialized.
Input:
none
Output:
LOGICAL
<Return Value>
User interface has been initialized.
User interface has not been initialized.
Example:
Please see ui_is_initialized (p. 345) in the MSC Acumen Toolkit - Code Examples.
 
ui_get_client
( client_info )
Description:
Get the X client.
Input:
none
Output:
STRING
client_info [80]
X client.
Example:
Please see ui_get_client (p. 340) in the MSC Acumen Toolkit - Code Examples.
 
ui_get_server
( server_info )
 
Description:
Get the X server.
Input:
none
Output:
STRING
server_info[]
X server.
Example:
See example for ui_get_client, 139. See also ui_get_server (p. 342) in the MSC Acumen Toolkit - Code Examples.