PCL Reference Manual > Basic Functions > File Menu
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
File Menu
This section is used to describe some of the functions used to import and export model geometry files to and from files that can be used by various types of CAD systems
 
neutold_import_neutral
(file_name, group_name, entity_flags, minimum_id, maximum_id, offset)
 
Description:
This function is used to import a neutral file.
Input:
STRING
file_name[]
This value specifies the name of the neutral file to be imported.
STRING
group_name[]
This value specifies the name of the group to which the imported geometry will be added.
LOGICAL
entity_flags(35)
This value specifies an array of flags identifying the types of entities to be imported from the neutral file. See the remarks below for more information.
INTEGER
minimum_id(35)
This value specifies an array of values used to set the minimum ID values for the entities in the current database.
INTEGER
maximum_id(35)
This value specifies an array of values used to set maximum ID value for the entities in the current database.
INTEGER
offset(35)
This value specifies user supplied entity label or id offsets.
Output:
INTEGER
<Return Value>
This function always returns a value of 0.
Error Conditions:
None.
Remarks:
The input value entity_flags controls which entity types are to be exported to the neutral file. The offset into the array identifies the data type. Setting the value at that offset to TRUE will cause that entity type to be written to the neutral file. The following table identifies the offset into the array for each entity type
 
Offset
Entity type
Offset
Entity type
 
 
 
 
1
Nodes
19
View Factor
2
Elements
20
Named Components
3
Materials
21
grid#
4
Element Properties
22
Line
5
Coordinate Frames
23
Patch
6
Distributed Loads
24
Hyperpatch
7
Forces
25
(not used)
8
Displacements
26
(not used)
9
(not used)
27
(not used)
10
Node Temperature
28
(not used)
11
Element Temperature
29
(not used)
12
(not used)
30
(not used)
13
(not used)
31
(not used)
14
MPC
32
GFEG
15
Nodal Heating
33
CFEG
16
Distributed Heating
34
(not used)
17
Convection
35
(not used)
18
(not used)
 
 
This function can display an information popup message form with the following messages:
 
25000070
Neutral file reading completed successfully.
25000080
Loading Neutral file data into Memory.
25000023
%I% Packet%I%%A% read.
This function can display a query yes or no popup message form with the following message:
 
25000020
Do you want the Neutral File printed to the terminal as it is being read?
This function can display a fatal error popup message if an error value is returned by the function:
13000004
Duplicate entry exists in table
13000007
An unspecified database error occurred
13000090
Analysis code input was not found
See the listing for this function Broken, Obsolete, Modified and New Functions for further information.
Example:
Please see neutold_import_neutral.
 
neutral_export2
(file_name, title, entity_flags, all_groups, number_of_groups, group_entity_ids)
 
Description:
This function will generate a Patran 2.5 format neutral file from a Patran database.
Input:
STRING
file_name[]
This value specifies the name of the neutral file to
be written.
STRING
title[]
This value specifies the title to put in the packet 25 title field.
LOGICAL
entity_flags(35)
This value specifies an array of flags used to identify the specific entity types to be exported. See the remarks below for more information.
LOGICAL
all_groups
This value should be set TRUE if the entire model is to be exported, FALSE if only selected groups are to be exported.
INTEGER
number_of_groups
If exporting selected groups, this value is used to indicate the number of groups being written to the neutral file.
INTEGER
group_entity_ids(number_of_groups)
If exporting selected groups, this value is used to pass the list of group IDs for the entities being written to the neutral file.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This function may return a nonzero value if an error occurs.
 
Remarks:
The input value entity_flags controls which entity types are to be exported to the neutral file. The offset into the array identifies the data type. Setting the value at that offset to TRUE will cause that entity type to be written to the neutral file. The following table identifies the offset into the array for each entity type
 
Offset
Entity type
Offset
Entity type
1
Nodes
19
View Factor
2
Elements
20
Named Components
3
Materials
21
Grid
4
Element Properties
22
Line
5
Coordinate Frames
23
Patch
6
Distributed Loads
24
Hyperpatch
7
Forces
25
(not used)
8
Displacements
26
(not used)
9
(not used)
27
(not used)
10
Node Temperature
28
(not used)
11
Element Temperature
29
(not used)
12
(not used)
30
(not used)
13
(not used)
31
(not used)
14
MPC
32
GFEG
15
Nodal Heating
33
CFEG
16
Distributed Heating
34
(not used)
17
Convection
35
(not used)
18
(not used)
 
 
If more than 1000 entities are being written to the file of any one type, a percent complete bar is displayed. Messages get printed to the command window indicating the number of successful
packets read.
This function will display an information popup message form if opening the neutral file and writing the packet 25 and title information fails:
45000001
Unable to open output file. Aborting Neutral File Export.
This function will display an information popup message form at the completion of the operation:
 
45000099
Neutral File export completed successfully.
This function will display a warning popup message form if reading the database for coordinate, nodes, elements, properties, materials, mpcs, loads and boundary conditions fails:
 
45000002
Error writing Finite Element Model. Will try to complete Neutral File.
This function will display a warning popup message form if reading the named components from the database and writing them to the neutral file fails:
 
45000003
Error writing Named Components. Aborting FEM portion of Neutral File.
Will try to complete writing geometry, if any.
Example:
Please see neutral_export2 (p. 10) in the PCL Reference Manual Examples.
 
p3_cad_get_entity_name
(p3id, p3type, attribute)
Description:
This function will retrieve a string of a CAD name attribute for a Patran entity. The Patran identifier and entity type are used to lookup the associated CAD name attribute.
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated CAD name attribute.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid.
Output:
STRING
attribute
The CAD name attribute.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory
10
A corrupt attribute was detected.
255
Invalid string length.
257
Can’t reallocate virtual string array.
259
Not a virtual string.
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in the database.
13000213
A database lookup failed to locate the target index key.
<non-zero>
Attribute not found
 
 
p3_cad_get_entity_strings
(p3id, p3type, attrib_count, attrib_titles, attrib_values)
 
Description:
This function will retrieve all CAD string attributes for a Patran entity. The Patran identifier and entity type are used to look up the associated CAD string attributes.
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated CAD name attributes.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid.
Output:
INTEGER
attrib_count
The number of string attributes associated to the referenced Patran entity.
STRING[]
attrib_titles
An array of CAD name attribute titles.
STRING[]
attrib_values
An array of CAD name attribute values.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory
10
A corrupt attribute was detected.
255
Invalid string length.
257
Can’t reallocate virtual string array.
259
Not a virtual string.
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in
the database.
13000213
A database lookup failed to locate the target index key.
<non-zero>
Attribute not found
 
 
p3_express_import
(option_file, file_name, geometry_tracking, reset_tolerance, tolerance_prompt, return_entity_count, entities)
 
Description:
This function imports geometry information from a file using the express neutral file format.
Input:
STRING
option_file[]
This value specifies the name of the express options file which determines entity and group filters, etc. It is optional and can be input as an empty string or ““.
STRING
file_name[]
This value specifies the name of the express file to import.
LOGICAL
geometry_tracking
This value should be set to TRUE if a log file of geometry tracking is to be created.
LOGICAL
reset_tolerance
This value should be set to TRUE if the user will allow Patran to reset the tolerances.
LOGICAL
tolerance_prompt
This value should be set to TRUE if the user would like to be prompted before tolerances are changed.
LOGICAL
return_entity_count
This value should be set to TRUE if Patran is to return a count of entities created in the entities array.
Output:
INTEGER
entities (64)(2)
This value is an array of entity types and the number of types in the express file.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-9999
This is an internal status condition. There is no corresponding status message in the message database.
55001011
The file option is not valid or not supported.
 
Remarks:
This function will import model geometry and finite element information from a file using the express file format, place them in the Patran database, and display them in the current viewport. It will display a popup form that will list a summary of the number of entities accessed from the express file.
The PCL function p3_express_import_exit() must be called to properly terminate this import operation.
See the function listing for the p3_express_options_file for more information on the express options file entered as the input value option_file.
See Importing Express Neutral Files (p. 101) in the Patran Reference Manual for further information.
This function can produce fatal popup message forms.
Example:
Please see p3_express_import (p. 11) in the PCL Reference Manual Examples.
 
p3_express_import_preview
(option_file, file_name, tolerance_check, return_entity_count, entities, cad_attributes, cad_tolerance, shortest_curve_length)
 
Description:
This function previews geometry information from a file using the express neutral file format.
Input:
STRING
option_file[]
This value specifies the name of the express options file which determines entity and group filters, etc. It is optional and can be input as an empty string or ““.
STRING
file_name[]
This value specifies the name of the express file to import.
LOGICAL
tolerance_check
This value should be set to TRUE if the tolerance needs to be checked.
LOGICAL
return_entity_count
This value should be set to TRUE if this function is to return a count of entities created in the entities array.
Output:
INTEGER
entities (64)(2)
This value returns an array of entity types and the number of types in the express file.
STRING
cad_attributes[2](256)
This value returns the CAD system and model name.
REAL
cad_tolerance
This value returns the calculated CAD tolerance.
REAL
shortest_curve_length
This value returns the shortest curve length for non-degenerate curves in the model. This value is calculated only if the input value tolerance_check is set to TRUE.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-9999
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function will read information about the model geometry and finite element information in a file using the express file format. It will display a popup form that will list a summary of the number of entities accessed from the express file.
The PCL function p3_express_import_exit() must be called to properly terminate this import operation.
See the function listing for the p3_express_options_file for more information on the express options file entered as the input value option_file.
See Importing Express Neutral Files (p. 101) in the Patran Reference Manual for further information.
This function can produce fatal popup message forms.
This function can produce a warning popup message form with the following message:
55001012
%I% Error(s) encountered during generation of the import file in the foreign sending system. These errors are detailed in the log file%A%.
Example:
Please see p3_express_import_preview (p. 12) in the PCL Reference Manual Examples.
 
p3_express_import_exit
(delete_option_file, delete_express_file)
 
Description:
This function is called to terminate an express neutral file import operation.
Input:
LOGICAL
delete_option_file
This value, when set to TRUE, will cause the express options file to be deleted.
LOGICAL
delete_express_file
This value, when set to TRUE, will cause the express neutral import file to be deleted.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
55000011
The file option is not valid or not supported.
55000014
The file was not found.
55000016
Unable to close the file.
Remarks:
Call this function after calling p3_express_import() or p3_express_import_preview() to properly terminate the operation.
This function can produce fatal popup message forms.
Example:
Please see p3_express_import_exit (p. 13) in the PCL Reference Manual Examples.
 
p3_express_options_file
(option_file, versioning, file_format, action, source, transform_exists, transformation, number_of_groups, group_names, group_entities, group_layers, group_colors, all_entities, entities, all_layers, layers, all_colors, colors, trimmed_curve_type, trimmed_surface_type, solid_representation)
 
Description:
This function writes an optional file that is used as an input to the p3_express_import() and p3_express_import_preview() functions.
Input:
STRING
option_file[]
This value specifies the name of the express options file to be created.
LOGICAL
versioning
This value, when set to TRUE, specifies the use of a version number to be used with the express options file being created.
INTEGER
file_format
This value sets the file format to be used in writing the file and can have the following values: 1 for ascii files, 2 for compressed ascii with no white space characters, and 3 for binary files.
INTEGER
action
This value specifies the type of operation that this options file will be used with. Currently, only the input file operation is supported. This argument can have the following values: 1 import file, 2 export file, 3 import modifications, and 4 export modifications.
INTEGER
source
This value specifies the source of the geometry entities. This argument can have values that are defined in the header file geometry_coos.i as the following symbols: MCDONNEL_DOUGLAS or 101254, DASSAULT_SYSTEMS or 40686, PARAMETRIC_TECHNOLOGY or 22058, MATRA or 32465, COMPUTER_VISION or 22085, PDA_ENGINEERING or 52054.
LOGICAL
transform_exists
This value, when set to TRUE, indicates that a transformation matrix is available in the input value transformation and is to be written to the options file.
REAL
transformation[12]
This value expresses the transformation matrix to be written to the file.
This arguement creates the transformation matrix for translators that provide a model units/scale factor:
The scale factor value is added in the 1, 5, 9 locations of the matrix. This is applied to the geometry on import.
/*
 * Build the transformation matrix based on the scale * factor
 */
        FOR ( i = 1 TO 12 )
           tmat(i) = 0.0
        END FOR
 
        IF( scale_factor > 0.0 ) THEN
           use_tmat = TRUE
           tmat(1) = scale_factor
           tmat(5) = scale_factor
           tmat(9) = scale_factor
        END IF
INTEGER
number_of_groups
This value specifies the number of groups to be created in the options file.
STRING
group_names[number_of_groups]()
This value specifies an array of group names that will whose entities will be read from the express neutral file.
INTEGER
group_entities(number_of_groups)(64)
This value specifies the entities to be read in for each group from the express neutral file. Initialize all unused entries to 0. If the first entry is 0, then it is assumed that all entities are desired.
INTEGER
group_layers(number_of_groups)(256)
This value specifies the layers to be read in for each group from the express neutral file. Initialize all unused entries to -1. If the first entry is -1, then it is assumed that all layers are desired. Each entry in this argument can have a value ranging from 0 to 255 or 1 to 256 depending on the CAD system. A value of 257 indicates that the working or active layer will be accessed.
INTEGER
group_colors(number_of_groups)(10)
This value specifies the colors to be read in for each group from the express neutral file. Initialize all unused entries to 0. If the first entry is 0, then it is assumed that all colors are desired. See the remarks below for more information.
LOGICAL
all_entities
This value, when set to TRUE, will cause all entities to be imported.
INTEGER
entities(64)
This value specifies the ID values for the entities to import from the express neutral file. All unused entries must be initialized to 0. This array is not used if the input value all_entities is set to TRUE.
LOGICAL
all_layers
Set this value to TRUE to import all layers.
INTEGER
layers(256)
This value specifies the layers to import from the express neutral file. All unused entries must be initialized to -1. This array is not used if the input value all_layers is set to TRUE.
LOGICAL
all_colors
Set this value to TRUE to import all colors.
INTEGER
colors(10)
This value specifies the colors to import from the express neutral file. All unused entries must be initialized to 0. This array is not used if the input value all_colors is set to TRUE.
INTEGER
trimmed_curve_type
This value specifies the trimmed curves type to be used with curves from the express neutral file. This argument can have the following values: 1 for 2-d or parametric trimming curves, 2 for 3-d or real space trimming curves, or 3 for no preference.
INTEGER
trimmed_surface_type
This value specifies the trimmed surface type to be used with surfaces from the express neutral file. This argument can have the following values: 1 for both general and simply trimmed surfaces, 2 for only general trimmed surfaces, or 3 for no preference.
INTEGER
solid_representation
This value specifies the solid representation type to be used with surfaces from the express neutral file. This argument can have the following values: 1 for boundary representation solids, 2 for the constituent surfaces of the boundary representation solid, or 3 for no preference.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
55000001
Unable to allocate memory.
55000006
The handle accessed is not a file handle.
55000011
Error(s) occurred which may be resolved by using a more refined tolerance.
55000014
The file was not found.
55000016
Unable to close the file.
55000022
Not a valid entity. Either the name is not correct or it is not supported.
Remarks:
Each entry in the input value group_colors array input can have the following values:
 
0
color not used.
6
blue
1
all colors
7
green
2
black
8
yellow
3
white
9
magenta
4
red
10
cyan
5
orange
 
 
This function can produce fatal popup message forms.
The values allowed for the input value source are defined in the geometry_coos.i include file. Use the symbols that define these values instead of the values themselves to allow for any changes that may take place with these values in future releases of Patran.
Example:
Please see p3_express_options_file (p. 14) in the PCL Reference Manual Examples.
 
p3_ps_open_ug
(ug_file_name, save_switch, sew_switch, filter, number_of_components)
 
Description:
This function passes information from a Unigraphics parts file to the Unigraphics server through the use of a transmit file.
Input:
STRING
ug_file_name[]
This value specifies the name of the Unigraphics part file.
LOGICAL
save_switch
This value, when set to TRUE, will cause a copy of the file used to transmit information to the Unigraphics server to be saved. When this value is set to FALSE, the transmit file will not be saved.
LOGICAL
sew_switch
This value, when set to TRUE, will allow sewing to take place. When this value is set to FALSE, sewing will not take place.
INTEGER
filter[]
This value is used to specify which information from each entity that will be passed to the Unigraphics server. Offset 0 of this array is used to specify the number of entities. The array should be declared to have the (number of entities + 1) number of offsets. When a value in an offset is set to 0 the wire, sheet, and solid bodies information will be used. Specific entity type information can be used by setting the array to the values listed below.
Output:
INTEGER
number_of_components
This value returns the number of components in the Unigraphics parts file.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
None.
Remarks:
The types of entities used from the parts file can be specified by setting offsets in the input value filter to the following values:
Description
Value
Comments
sgmpoint
10
 
sgmplane
20
 
sgmvector
30
 
PieceWise_Cubic_Polynomial_Curve
101
 
IGES_Nurb_Curve
102
 
IGES_Cubic_Spline
103
 
IGES_Arc
104
 
IGES_Composite_Curve
105
 
IGES_Line
106
 
IGES_Conic
107
 
IGES_PieceWise_Linear
108
 
Rational_Bezier
109
 
Curve_On_Surface
110
 
PDA_line
111
 
MDC_Curve
112
 
IGES_Offset_Curve
113
 
CATIA_Curve
114
 
COMPUTER_VISION_Curve
115
 
PieceWise_Rational_Polynomial_Curve
116
 
N_Dimensional_Cubic_Spline
117
 
MDC_V9Curve
118
 
Curve_Id_Reference
119
 
Plane_Project_Curve
120
 
IGES_Nurb_Surface
1001
 
IGES_Trimmed_Surface
1002
 
IGES_BiCubic_Patch_Network
1003
 
IGES_Surface_Of_Revolution
1004
 
IGES_Ruled_Surface
1005
 
IGES_Tabulated_Cylinder
1006
 
Rational_Bezier_Network
1007
 
Ordinary_Trimmed_Surface
1008
 
PDA_patch
1009
 
MDC_Surface
1010
 
Bilinear_Coons_Surface
1011
 
IGES_Offset_Surface
1012
 
PTC_plane
1013
 
PTC_cylinder
1014
 
PTC_cone
1015
 
PTC_torus
1016
 
PTC_fillet_surface
1017
 
PTC_generalized_Coons_surface
1018
 
PTC_cylindrical_spline_surface
1019
 
CATIA_Surface
1020
 
COMPUTER_VISION_Surface
1021
 
PieceWise_Rational_Polynomial_Surface
1022
 
Fence_Surface
1023
 
Surface_on_Solid
1024
 
Curve_Interpolating_Surface
1025
 
Extruded_Surface
1026
 
Glide_Surface
1027
 
Sweep_Normal_Surface
1028
 
MDC_V9Surface
1029
 
Composite_Trim_Surface
1030
 
Surface_Id_Reference
1031
 
PTC_sphere
1032
 
MDC_Sculptured_Surface
1033
 
Ordinary_Composite_Trim_Surface
1034
 
MDC_Parent_Surface
1035
 
TESSELLATED_SURFACE
1036
 
PDA_hpat
2001
 
Ordinary_Body
2002
General Brep Body with no parameterization.
Tri_Linear_Solid
2003
 
Surface_Interpolating_Solid
2004
 
Solid_Of_Revolution
2005
 
Solid_6face
2006
 
Extruded_Solid
2007
 
Glide_Solid
2008
 
Sweep_Normal_Solid
2009
 
Extruded_Body
2010
2 1/2 D Brep Body with no parameterization.
Ordinary_Volume
2011
Pseudo-brep, has no parameterization and ambiguous topology.
Solid_Id_Reference
2012
 
TricubicNet
2013
Hyperpatch network.
SEW_SHEETS_BY_LAYER
52937
 
Example:
None
 
p3_ps_open_ug_v2
(ug_file_name, import_option_flags, entity_filter, preview_filter, number_of_components)
 
Description:
This function passes information from a Unigraphics parts file to the Unigraphics server through the use of a transmit file.
Input:
STRING
ug_file_name[]
This value specifies the name of the Unigraphics part file.
LOGICAL
import_option_flags[]
This value is used to specify which import options are ON. Offset 0 of this array is used to specify the number of options that are on. If using the default values, the number will be 0. The array should be declared to have the (number of options + 1) number of offsets. The possible offset values are as follows:
=1; Unigraphics Sew
=2; Save Transmit File
=3; Import Attributes
=4; Preview Attributes
=5; Preview Assembly
INTEGER
entity_filter[]
This value is used to specify which information from each entity that will be passed to the Unigraphics server. Offset 0 of this array is used to specify the number of entities. The array should be declared to have the (number of entities + 1 + number of layers + 2) number of offsets. When a value in an offset is set to 0 the wire, sheet, and solid bodies information will be used. The possible offset values are described below in Remarks.
STRING
preview_filter[]
This value is used to specify which preview filter options are used for Attributes and Assembly Components. The array should be declared to have the (6+number of attributes + 2 + number of components ) number of offsets. The possible offset values are as follows:
=1; “Attributes”
=2; “2”
=3; Name Attribute filter string ( * is default)
=4; Object Attribute filter string ( * is default)
=5; “I” or “E” ( I = import; E = Exclude)
=6; number of attributes ( 0 = all attributes )
=6n; the n attribute names
=6n+1; “Components”
=6n+2; number of components ( 0 = all components)
=6n+3; the m components names
Output:
INTEGER
number_of_components
This value returns the number of components in the Unigraphics parts file.
INTEGER
<Return Value>
This function returns a value of 1 when a Unigraphics piece part has been successfully imported and a value of 2 for a Unigraphics assembly. Any other non zero value indicates an error.
Error Conditions:
21010310
Cannot connect to P3-UG Server on UNIX.
21010311
Cannot connect to P3-UG Server on NT.
21010301
Cannot extract Parasolid Transmit file from the Unigraphics Part.
21010302
Import failed because can’t find part.
20045
No Unigraphics Geometry was imported.
20047
Unigraphics Sewing was unable to continue.
Remarks:
The types of entities used from the parts file can be specified by setting offsets in the input value entity_filter to the following values:
Description
Value
Comments
MDC_Curve
112
 
MDC_Surface
1010
 
Ordinary_Body
2002
 
UG_Feature
-123997
 
IMPORT_BY_LAYER
52937
 
layer numbers
0-256
 
Example:
None.
 
p3_ps_preload_part
(ug_file_name)
 
Description:
This function calls the P3-UG Server to load the Unigraphics Part into UG/OPEN. .
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
<Return Value>
This function returns a value of 1 if the Unigraphics Part is a piece part and a value of 2 when the Unigraphics Part is an assembly model.
Error Conditions:
21010310
Cannot connect to P3-UG Server on UNIX.
21010311
Cannot connect to P3-UG Server on NT.
21010301
Cannot extract Parasolid Transmit file from the Unigraphics Part.
21010302
Import failed because can’t find part.
20045
No Unigraphics Geometry was imported.
20047
Unigraphics Sewing was unable to continue.
 
Example:
None
 
p3_ug_get_attr_list
(ug_file_name, name_filter, object_filter, attr_count, attributes)
Description:
This function will list the name and object attributes in a Unigraphics part based on the name filter and object filter specified.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
STRING
name_filter[]
The string specifying the filter to use to list the Unigraphics name attributes in a part.
STRING
object_filter[]
The string specifying the filter to use to list the Unigraphics object attributes in a part.
Output:
INTEGER
attr_count
The number of name and object attributes in the specified Unigraphics part.
STRING
attributes[][]
The names of the name and object attributes in the specified Unigraphics part.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None
 
p3_ug_xmt_import
(xmt_file_name, part_file_name, express_file_name, import_switch, sew_edges, ug_count, patran_count, tolerance)
 
Description:
This function imports parasolid transmit file models.
Input:
STRING
xmt_file_name[512]
This value specifies the name of the transmit file.
STRING
part_file_name[512]
his value specifies the Unigraphics part file name. This value must include the full path and may be set to nothing or ““.
STRING
express_file_name[]
This value specifies the express options file name. This value may be set to nothing or ““.
LOGICAL
import_switch
This value specifies, when set to TRUE, that the transmit file should be imported. When this value is set to FALSE the transmit file will be previewed.
INTEGER
sew_edges
This value specifies sewing, verification, and cleanup options. The option values can be anded together to specify more than one option. The following option values are allowed: 2 to sew Patran edges, 4 to verify edges, 8 to remove degenerate faces, 16 to comvert trimmed to untrimmed surfaces, 32 to equivelance edge vertices.
Output:
INTEGER
ug_count[5]
This value returns counts for the following items: offset 0, minimal or vertex bodies; offset 1, wire bodies; offset 2, sheet bodies; offset 3, b-rep bodies; offset 4, general bodies.
INTEGER
patran_count[4]
This value returns the number of: offset 0, points; offset 1, curves; offset 2, surfaces; offset 3, solids; created by the import process.
REAL
tolerance[2]
This value returns the suggested model tolerance for modeling and meshing operations in offset 0 and the graphics tolerance in offset 1.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
1
This is an internal status condition. There is no corresponding status message in the message database.
21010002
Unigraphics reports error opening file%A%. Check part file, Path name, Version number and check run-time environment variables and/or support files.
21010007
A Unigraphics memory allocation error occurred. Unable to allocate memory.
21010009
An error occurred while closing the model. Filename =%A%.
21010035
Unigraphics database%A% already referenced. Open a new Patran database to access another part.
Example:
None
 
p3_ug_xmt_import_v1
(xmt_file_name, part_file_name, express_file_name, import_switch, sew_edges, ug_count, patran_count, n_layers, layer_ids, tolerance)
 
Description:
This function imports parasolid transmit file models.
Input:
STRING
xmt_file_name[512]
This value specifies the name of the transmit file.
STRING
part_file_name[512]
his value specifies the Unigraphics part file name. This value must include the full path and may be set to nothing or ““.
STRING
express_file_name[]
This value specifies the express options file name. This value may be set to nothing or ““.
LOGICAL
import_switch
This value specifies, when set to TRUE, that the transmit file should be imported. When this value is set to FALSE the transmit file will be previewed.
INTEGER
sew_edges
This value specifies sewing, verification, and cleanup options. The option values can be anded together to specify more than one option. The following option values are allowed: 2 to sew Patran edges, 4 to verify edges, 8 to remove degenerate faces, 16 to comvert trimmed to untrimmed surfaces, 32 to equivelance edge vertices.
Output:
INTEGER
ug_count[5]
This value returns counts for the following items: offset 0, minimal or vertex bodies; offset 1, wire bodies; offset 2, sheet bodies; offset 3, b-rep bodies; offset 4, general bodies.
INTEGER
patran_count[4]
This value returns the number of: offset 0, points; offset 1, curves; offset 2, surfaces; offset 3, solids; created by the import process.
INTEGER
n_layers
This value returns the number of layers used in system that generated the parasolid transmit file.
INTEGER
layer_ids[5][256]
This value returns the layer ids used in the system that generated the parasolid transmit file.
REAL
tolerance[2]
This value returns the suggested model tolerance for modeling and meshing operations in offset 0 and the graphics tolerance in offset 1.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
1
This is an internal status condition. There is no corresponding status message in the message database.
21010002
Unigraphics reports error opening file%A%. Check part file, Path name, Version number and check run-time environment variables and/or support files.
21010007
A Unigraphics memory allocation error occurred. Unable to allocate memory.
21010009
An error occurred while closing the model. Filename =%A%.
21010035
Unigraphics database%A% already referenced. Open a new Patran database to access another part.
Example:
None.
 
p3_ug_xmt_preview
(xmt_file_name, ug_count, n_layers, layer_ids)
 
Description:
This function previews the contents of parasolid transmit file models.
Input:
STRING
xmt_file_name[512]
This value specifies the name of the transmit file.
Output:
INTEGER
ug_count[5]
This value returns counts for the following items: offset 0, minimal or vertex bodies; offset 1, wire bodies; offset 2, sheet bodies; offset 3, b-rep bodies; offset 4, general bodies.
INTEGER
n_layers
This value returns the number of layers used in system that generated the parasolid transmit file.
INTEGER
layer_ids
This value returns the layer idsused in system that generated the parasolid transmit file
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
Example:
None.
 
p3_ug_get_part_occ_list
(ug_file_name, occ_count, occurrences)
 
Description:
This function will list the names of the Assembly occurrences in a Unigraphics part.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
occ_count
The number of Assembly occurrences in the specified Unigraphics part.
STRING
occurrences[][]
The names of the Assembly occurrences in the specified Unigraphics part.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None
 
pfk_get_features
(ug_file_name, feature_names, suppress_flag)
Description:
This function calls the P3-UG Server to get the Unigraphics features.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
STRING
feature_names[256] (VIRTUAL)
The names of features
INTEGER
suppress_flag (VIRTUAL)
The state of the features, whether they are suppressed or unsuppressed.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
 
Example:
None
 
pfk_get_feat_with_params
(ug_file_name, feature_names, suppress_flag)
 
Description:
This function calls the P3-UG Server to get the Unigraphics features that have parameters.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
STRING
feature_names[256] (VIRTUAL)
The names of features that have parameters
INTEGER
suppress_flag (VIRTUAL)
The state of the features, whether they are suppressed or unsuppressed.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None.
 
pfk_get_num_feat
(ug_file_name, num_features)
Description:
This function calls the P3-UG Server to get the number of Unigraphics features in a part.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
num_features
The number of features in a part.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
None.
 
Example:
None.
 
pfk_get_num_feat_with_params
(ug_file_name, num_features)
 
Description:
This function calls the P3-UG Server to get the number of Unigraphics features that have parameters.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
num_features
The number of features that have parameters
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
None.
Example:
None
 
pfk_get_versioned_file_name
(ug_file_name)
 
Description:
This function calls the P3-UG Server to get the name of the Unigraphics Part that is a copy of the original part imported into Patran.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None.
 
pfk_highlight_feat_name
(num_features, feature_names)
 
Description:
This function highlights the features in the Patran viewport.
Input:
INTEGER
num_features
The number of features to highlight.
STRING
feature_names[]
The names of the features to highlight.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None
 
pfk_create_ug_import
(ug_file_name, import_options_flags, entity_filter, preview_filter, sew_option, option_file, versioning, file_format, action, source, transform_exists, transformation, number_of_groups, group_names, group_entities, group_layers, group_colors, all_entities, entities, all_layers, layers, all_colors, colors, trimmed_curve_type, trimmed_surface_type, solid_representation)
 
Description:
This function creates a Unigraphics Import Object. It is called in conjunction with p3_ps_open_ug_v2 and p3_ug_xmt_import_v1.
Input:
STRING
ug_file_name[]
This value specifies the name of the Unigraphics
part file.
LOGICAL
import_option_flags[]
This value is used to specify which import options are ON. Offset 0 of this array is used to specify the number of options that are on. If using the default values, the number will be 0. The array should be declared to have the (number of options + 1) number of offsets. The possible offset values are as follows:
=1; Unigraphics Sew
=2; Save Transmit File
=3; Import Attributes
=4; Preview Attributes
=5; Preview Assembly
INTEGER
entity_filter[]
This value is used to specify which information from each entity that will be passed to the Unigraphics server. Offset 0 of this array is used to specify the number of entities. The array should be declared to have the (number of entities + 1 + number of layers + 2) number of offsets. When a value in an offset is set to 0 the wire, sheet, and solid bodies information will be used. The possible offset values are described below in Remarks.
STRING
preview_filter[]
This value is used to specify which preview filter options are used for Attributes and Assembly Components. The array should be declared to have the (6+number of attributes + 2 + number of components ) number of offsets. The possible offset values are as follows:
=1; “Attributes”
=2; “2”
=3; Name Attribute filter string ( * is default)
=4; Object Attribute filter string ( * is default)
=5; “I” or “E” ( I = import; E = Exclude)
=6; number of attributes ( 0 = all attributes )
=6n; the n attribute names
=6n+1; “Components”
=6n+2; number of components ( 0 = all components)
=6n+3; the m component names
INTEGER
sew_option
This value specifies sewing, verification, and cleanup options. The option values can be anded together to specify more than one option. The following option values are allowed: 2 to sew Patran edges, 4 to verify edges, 8 to remove degenerate faces, 16 to comvert trimmed to untrimmed surfaces, 32 to equivelance edge vertices.
STRING
option_file[]
This value specifies the name of the express options file to be created.
LOGICAL
versioning
This value, when set to TRUE, specifies the use of a version number to be used with the express options file being created.
INTEGER
file_format
This value sets the file format to be used in writing the file and can have the following values: 1 for ascii files, 2 for compressed ascii with no white space characters, and 3 for binary files.
INTEGER
action
This value specifies the type of operation that this options file will be used with. Currently, only the input file operation is supported. This argument can have the following values: 1 import file, 2 export file, 3 import modifications, and 4 export modifications.
INTEGER
source
This value specifies the source of the geometry entities. This argument can have values that are defined in the header file geometry_coos.i as the following symbols: MCDONNEL_DOUGLAS or 101254, DASSAULT_SYSTEMS or 40686, PARAMETRIC_TECHNOLOGY or 22058, MATRA or 32465, COMPUTER_VISION or 22085, PDA_ENGINEERING or 52054.
LOGICAL
transform_exists
This value, when set to TRUE, indicates that a transformation matrix is available in the input value transformation and is to be written to the options file.
REAL
transformation[12]
This value expresses the transformation matrix to be written to the file.
This arguement creates the transformation matrix for translators that provide a model units/scale factor:
The scale factor value is added in the 1, 5, 9 locations of the matrix. This is applied to the geometry on import.
/* 
 * Build the transformation matrix based on 
the scale * factor 
 */ 
        FOR ( i = 1 TO 12 ) 
           tmat(i) = 0.0 
        END FOR 
  
        IF( scale_factor > 0.0 ) THEN 
           use_tmat = TRUE 
           tmat(1) = scale_factor 
           tmat(5) = scale_factor 
           tmat(9) = scale_factor 
        END IF
INTEGER
number_of_groups
This value specifies the number of groups to be created in the options file.
STRING
group_names[number_of_groups]()
This value specifies an array of group names that will whose entities will be read from the express neutral file.
INTEGER
group_entities(number_of_groups)(64)
This value specifies the entities to be read in for each group from the express neutral file. Initialize all unused entries to 0. If the first entry is 0, then it is assumed that all entities are desired.
INTEGER
group_layers(number_of_groups)(256)
This value specifies the layers to be read in for each group from the express neutral file. Initialize all unused entries to -1. If the first entry is -1, then it is assumed that all layers are desired. Each entry in this argument can have a value ranging from 0 to 255 or 1 to 256 depending on the CAD system. A value of 257 indicates that the working or active layer will be accessed.
INTEGER
group_colors(number_of_groups)(10)
This value specifies the colors to be read in for each group from the express neutral file. Initialize all unused entries to 0. If the first entry is 0, then it is assumed that all colors are desired. See the remarks below for more information.
LOGICAL
all_entities
This value, when set to TRUE, will cause all entities to be imported.
INTEGER
entities(64)
This value specifies the ID values for the entities to import from the express neutral file. All unused entries must be initialized to 0. This array is not used if the input value all_entities is set to TRUE.
LOGICAL
all_layers
Set this value to TRUE to import all layers.
INTEGER
layers(256)
This value specifies the layers to import from the express neutral file. All unused entries must be initialized to -1. This array is not used if the input value all_layers is set to TRUE.
LOGICAL
all_colors
Set this value to TRUE to import all colors.
INTEGER
colors(10)
This value specifies the colors to import from the express neutral file. All unused entries must be initialized to 0. This array is not used if the input value all_colors is set to TRUE.
INTEGER
trimmed_curve_type
This value specifies the trimmed curves type to be used with curves from the express neutral file. This argument can have the following values: 1 for 2-d or parametric trimming curves, 2 for 3-d or real space trimming curves, or 3 for no preference.
INTEGER
trimmed_surface_type
This value specifies the trimmed surface type to be used with surfaces from the express neutral file. This argument can have the following values: 1 for both general and simply trimmed surfaces, 2 for only general trimmed surfaces, or 3 for no preference.
INTEGER
solid_representation
This value specifies the solid representation type to be used with solids from the express neutral file. This argument can have the following values: 1 for boundary representation solids, 2 for the constituent surfaces of the boundary representation solid, or 3 for parameterized solids.
Output:
INTEGER
number_of_
components
This value returns the number of components in the Unigraphics parts file.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
21001326
The named part may not be imported at this time. A Cad Model entity was not able to be created for the part. This probably means that either a parasolid transmit file or another Unigraphics part of the same name has been imported into the model.
Example:
None.
 
pfk_is_part_imported
(ug_file_name, is_imported)
Description:
This function calls the P3-UG Server to check if the Unigraphics Part if it is already imported into the Patran database.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
LOGICAL
is_imported
=TRUE if part is already imported into Patran.
=FALSE if part is not already imported into Patran.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
21010035
Unigraphics database%A% already referenced. Open a new Patran database to access another part.
Example:
None.
 
pfk_modify_feature_part_name
(ug_file_name)
 
Description:
This function stores the name of the Unigraphics Part that is a copy of the original part imported into Patran to the Patran database. This is used when the location of the copied part has been changed.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
None
 
Example:
None
 
pfk_reimport
(ug_file_name)
Description:
This function calls the P3-UG Server to re-import the Unigraphics Part if it is already imported into the Patran database.
Input:
STRING
ug_file_name[512]
This value specifies the Unigraphics part file name. This value must include the full path.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if the Unigraphics Part successfully re-imports.
Error Conditions:
21010035
Unigraphics database%A% already referenced. Open a new Patran database to access another part.
Example:
None
 
pfk_suppress_feat
(num_features, feature_names)
 
Description:
This function calls the P3-UG Server to suppress the Unigraphics features.
Input:
INTEGER
num_features
The number of features to suppress.
STRING
feature_names[]
The names of the features to suppress.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None.
 
pfk_unsuppress_feat
(num_features, feature_names)
 
Description:
This function calls the P3-UG Server to unsuppress the Unigraphics features.
Input:
INTEGER
num_features
The number of features to unsuppress.
STRING
feature_names[]
The names of the features to unsuppress.
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
 
Example:
None
 
pfk_update
()
 
Description:
This function calls the P3-UG Server to regenerate the Unigraphics model with the latest feature editing changes and updates the Patran model accordingly.
Input:
 
Output:
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
21010303
Regeneration failed because cannot re-open the part.
Example:
None
ps_get_body_integer_attribute
(p3id, p3type, identifier, field_no, n_values, attribute_values)
 
Description:
This function will retrieve integer values of a Parasolid integer attribute that is attached to a Patran entity. The attribute definition must be identified by the input “identifier”. The Patran id and entity type are used to lookup the associated Parasolid attribute definition.
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated Parasolid attribute definition.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid
STRING
identifier
The string by which the attribute definition is identified.
INTEGER
field_no
The index to the location of the string field of the attribute definition.
Output:
INTEGER
n_values
The number of integer attribute values.
REAL
attribute_values[]
The Parasolid integer attribute values.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory.
4
Parasolid tag not found
7
The specified attribute does not exist.
8
The Parasolid attribute class does not exist.
9
The Parasolid attribute definition was not found.
11
Non-printing characters in name.
255
Invalid string length.
257
Can’t reallocate virtual string array
259
Not a virtual string.
5013
The attribute does not have a field with this number.
5014
The field is not a string field.
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in the database.
13000213
A database lookup failed to locate the target index key.
<non-zero>
Attribute not found.
 
Note:  
The value for “field_no” will be “0” for most if not all attributes.
 
ps_get_body_real_attribute
(p3id, p3type, identifier, field_no, n_values, attribute_values)
 
Description:
This function will retrieve real values of a Parasolid real attribute that is attached to a Patran entity. The attribute definition must be identified by the input “identifier”. The Patran id and entity type are used to lookup the associated Parasolid attribute definition.
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated Parasolid attribute definition.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid
STRING
identifier
The string by which the attribute definition is identified.
INTEGER
field_no
The index to the location of the string field of the attribute definition.
Output:
INTEGER
n_values
The number of real attribute values.
REAL
attribute_values[]
The Parasolid real attribute values.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory.
4
Parasolid tag not found
7
The specified attribute does not exist.
8
The Parasolid attribute class does not exist.
9
The Parasolid attribute definition was not found.
11
Non-printing characters in name.
255
Invalid string length.
257
Can’t reallocate virtual string array
259
Not a virtual string.
5013
The attribute does not have a field with this number.
5014
The field is not a string field.
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in the database.
13000213
A database lookup failed to locate the target index key.
<non-zero>
Attribute not found.
 
Note:  
The value for “field_no” will be “0” for most if not all attributes.
 
ps_get_body_string_attribute
(p3id, p3type, identifier, field_no, attribute)
 
Description:
This function will retrieve a Parasolid string attribute that is attached to a Patran entity. The attribute definition must be identified by the input “identifier” and attached to a Parasolid entity at the body layer. The Patran ID and entity type are used to lookup the associated Parasolid attribute definition.
Note: For identifier “SDL/TYSA_NAME”, the field_no = 0
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated Parasolid string attribute.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid.
STRING
identifier
The string by which the attribute definition is identified.
INTEGER
field_no
The index to the location of the string field of the attribute definition.
Output:
STRING
attribute
The Parasolid string attribute.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory
4
Parasolid tag not found.
7
The specified attribute does not exist.
9
The Parasolid attribute definition was not found.
11
Non-printing characters in name.
 
 
 
255
Invalid string length.
257
Can’t reallocate virtual string array.
259
Not a virtual string.
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in the database.
13000213
A database lookup failed to locate the target index key.
<non-zero>
Attribute not found
Example:
ps_get_body_string_attribute (p. 17) in the PCL Reference Manual Examples.
 
ps_get_string_attribute
(p3id, p3type, classname, field, attribute)
Description:
This function will retrieve a Parasolid string attribute that is attached to a Patran entity. The attribute definition must be identified by the input “identifier” and attached to a Parasolid Entity at the topology layer. The Patran id and entity type are used to lookup the associated Parasolid attribute definition.
Input:
INTEGER
p3id
The Patran id of the entity used to look up the associated Parasolid id.
INTEGER
p3type
The Patran entity type. Valid entity type values are:
1 for a point,
2 for a curve,
3 for a surface, and
4 for a solid.
STRING
classname
The Parasolid attribute class.
( See Parasolid Reference Manual for more information. )
INTEGER
field
The Parasolid attribute field.
( See Parasolid Reference Manual for more information. )
Output:
STRING
attribute
The Parasolid string attribute.
INTEGER
<Return Value>
This function returns a value of 0 if successful.
Error Conditions:
1
Out of memory
4
Parasolid tag not found
7
The specified attribute does not exist
8
The Parasolid attribute class does not exist. -
(See Parasolid reference for more information.
9
The Parasolid attribute definition was not found. -
(See Parasolid reference for more information.
11
Non-printing characters in name - (see parasolid_kernel.h)
255
Invalid string length.
257
Can’t reallocate virtual string array.
259
Not a virtual string.
5013
The attribute does not have a field with this number -
(see parasolid_kernel.h.)
5014
The field is not a string field - (see parasolid_kernel.h.)
13000211
Virtual memory has been exhausted.
13000212
There is an error interacting with the PERSISTENT_MEMORY relation in the database.
13000213
A database lookup failed to locate the target index key.
13000215
A database lookup failed to locate the target index key
Example:
ps_get_body_string_attribute (p. 17) in the PCL Reference Manual Examples.
 
select_focus.exit
()
 
Description:
This function will hide the currently displayed select menu, clear the current filter, and reset the currently selected data box.
Input:
None.
Output:
None.
Error Conditions:
None.
Remarks:
None
Example:
Please see select_focus.exit (p. 23) in the PCL Reference Manual Examples.
 
sgm_cad_access_v1
(file_name, file_name_length, group_name, group_name_length, entity_toggle_values, simply_trimmed, access_as_solids, enable_tol_prompt, color_toggle_values, all_layers, active_layer, layer_numbers, model_type, number_of_groups, group_entity_ids, group_entity_values, group_color_values,active_layer_values, layer_pointers, group_layers, n_ug_layers, ug_count, patran_count)
 
Description:
This function is used to import a Unigraphics part file defining the geometry of a model.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
INTEGER
file_name_length
This value specifies the number of characters in the file_name input value.
STRING
group_name[80]
This value specifies the name of the group to which the imported geometry will be added.
INTEGER
group_name_length
This value specifies the number of characters in the group_name input value.
LOGICAL
entity_toggle_values(18)
This value specifies an array used to select the geometry entity types to be imported where the offset into the array defines the entity type. The value at that offset will be set TRUE if that entity type is to be imported. See the remarks below for more information.
LOGICAL
simply_trimmed
This value, when set TRUE, causes all surfaces to be imported as simple trimmed surfaces and when set FALSE all surfaces are imported as general trimmed surfaces.
LOGICAL
access_as_solids
This value, when set to TRUE, allows all imported geometric entities are to be accessed as solids. Set this value to FALSE if the imported geometric entities define constituent surfaces.
LOGICAL
enable_tol_prompt
This value, when set to TRUE, enables the user to be prompted for the global model tolerance. When this value is set to FALSE, the currently defined global model tolerance is used.
LOGICAL
color_toggle_values(14)
This value specifies the overall color filter values. Currently, these values are ignored.
LOGICAL
all_layers
Set this value to TRUE if all entities identified by the input value entity_toggle_values from all layers should be imported.
LOGICAL
active_layer
This value should be set to TRUE if only the active or work layer entities will be imported.
INTEGER
layer_numbers(256)
This value specifies an input value that contains the layer values entered by the user from which entities will be imported.
STRING
model_type[6]
This value specifies the CAD model type and should always be set to “ug”.
INTEGER
number_of_groups
This value specifies the number of groups defined. This input has a maximum value of 256.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array that specifies the ID values used for each entity group.
LOGICAL
group_entity_values(number_of_groups, 20)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type. See the remarks below for more information.
LOGICAL
group_color_values(number_of_groups, 14)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the color type. Currently this input value is ignored.
LOGICAL
active_layer_values(number_of_groups)
This value specifies an array where the value at an offset corresponding to the offset for the group id in the group_entity_values input value to is set to TRUE if an entity in the active layer is included in the group identified by the offset into this array.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array where the offset into the array corresponds with the offset into the group_entity_ids array that lists the group ids. The value at that offset in this array identifies the offset into the group_layers array where the number of layer values for each group is stored. This array can store values that range from 1 to (512 - number_of_groups).
INTEGER
group_layers(512)
This value specifies an array that contains values used to identify the number of layers imported for each group.
Output:
INTEGER
ug_count(256, 37)
This value specifies a two dimensional array that uses the first dimension to identify a layer. The second dimension is used to identify a particular entity type. The cell value indicates the number of entities of a particular entity type present on a particular layer.
INTEGER
patran_count(4)
This value indicates the number of entities that were successfully imported. See the remarks below for more information.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
1
This is an internal status condition. There is no corresponding status message in the message database.
21010002
Unigraphics reports error opening file%A%. Check part file, Path name, Version number and check run-time environment variables and/or support files.
21010007
A Unigraphics memory allocation error occurred. Unable to allocate memory.
21010009
An error occurred while closing the model. Filename =%A%.
21010035
Unigraphics database%A% already referenced. Open a new Patran database to access another part.
Remarks:
The input value entity_toggle_values and the second dimension of the two dimensional input value group_entity_values are used to select the geometry entities to be imported where the offset into the array indicates the geometry type to be imported when set TRUE as follows:
 
Offset
Geometry type
Offset
Geometry type
1
LINE
10
TAB_CYL
2
ARC
11
RUL_SURF
3
CONIC
12
BOUND_PLANE
4
CUBIC_SPLINE
13
SCULP_SURF
5
B_SPLINE
14
FILLET_SURF
6
CYLINDER
15
B_SURF
7
CONE
16
OFFSET_SURF
8
SPHERE
17
FRGN_SURF
9
SURF_REV
19
UG_SOLID
The output value patran_count is used to count several different types of operations:
 
Offset Count Type
 
1
Not used. Should always be set to the initial value assigned to that offset.
2
Counts the number of ordinary trimmed surfaces.
3
Counts the number of: MDC Surfaces, IGES trimmed surfaces, Composite trimmed surfaces.
4
Number of entities written to the database.
This function can display a fatal popup form if the following errors occur:
 
21010002
Unigraphics reports error opening file%A%. Check part file, Path name, Version number and check run-time environment variables and/or support files.
21010007
A Unigraphics memory allocation error occurred. Unable to allocate memory.
21010009
An error occurred while closing the model. Filename =%A%.
This function can display an information popup form with the following messages:
 
21010032
Opening UNIGRAPHICS database%A%
21010038
Completed UNIGRAPHICS database (%A%) access
21010091
Unigraphics Part File Version Number:%A%
21010070
Scanning for entities in layer number%I%
21010071
Processing entities in work layer
This function will display a popup form that will provide a summary of the number of entities accessed from the Unigraphics part file.
This function can display a popup form used to prompt the user for information about the global model tolerance.
This function can display a warning popup message with the following text:
21010060
Missing one or more environment variables. The following MUST be set according to guidelines given in installation notes: OPENWINHOME (SUN4 ONLY), LD_LIBRARY_PATH(SUN4 ONLY), UGII_ROOT_DIR, UGII_FILE_SYSTEM, UGII_BASE_DIR, UGII_USERFCN, UGII_UGSOLIDS, UGII_SCHEMA, UGII_TERMMOD, UGII_06_FILE, UGII_10_FILE, UGII_CAM, UGII_UGCNCPT.
Example:
Please see sgm_cad_access_v1 (p. 24) in the PCL Reference Manual Examples.
 
sgm_catia_access
(file_name, group_name, group_name_length, entity_toggle_values, simply_trimmed, color_toggle_values, all_layers, active_layer, layer_numbers, model_type, number_of_groups, group_entity_ids, group_entity_values, group_color_values, active_layer_values, layer_pointers, group_layers, interactive_flag, user_control_flag)
 
Description:
This function is used to import a CATIA model geometry file but has no control over the model tolerance.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
group_name[80]
This value specifies the name of the group to which the imported geometry will be added. Currently, this value is ignored.
INTEGER
group_name_length
This value specifies the number of characters in the group_name input value. Currently, this value is ignored.
LOGICAL
entity_toggle_values(18)
This value specifies an array used to select the geometry entity types to be imported where the offset into the array defines the entity type. The value at that offset will be set TRUE if that entity type is to be imported. Currently, these values are ignored.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces. Currently, this value is ignored.
LOGICAL
color_toggle_values(14)
This value species an array that defines the overall color filter values. Currently, these values are ignored.
LOGICAL
all_layers
This value should be set to TRUE if all entities identified by the input value entity_toggle_values from all layers should be imported. Currently, this value is ignored.
LOGICAL
active_layer
This value should be set to TRUE if only the active or work layer entities will be imported. Currently, this value is ignored.
INTEGER
layer_numbers(256)
This value specifies an array that contains the layer values entered by the user for the overall layer filter. Currently, this value is ignored.
STRING
model_type[6]
This value specifies the CAD model type and should always be set to “catia”.
INTEGER
number_of_groups
This value specifies the number of groups defined. This input has a maximum value of 256. Currently, this value is ignored.
INTEGER
group_entity_ids(number_of_groups)
This value specifies the ID values for each user group. Currently, this value is ignored.
LOGICAL
group_entity_values(number_of_groups, 20)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type. Currently, these values are ignored.
LOGICAL
group_color_values(number_of_groups, 14)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type. Currently, these values are ignored.
LOGICAL
active_layer_values(number_of_groups)
This value specifies an array that is used by setting the value at an offset that corresponds to the offset for the group id in the group_entity_values input value to TRUE if an entity in the active layer is included in the group identified by the offset into the array. Currently, these values are ignored.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. This array can store values that range from 1 to (512 - number_of_groups). Currently, these values are ignored.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. Currently these values are ignored, allowing the array to be any size.
INTEGER
interactive_flag
This value is used to indicate if the import of the file is to take place in batch mode. Currently, this value is ignored.
INTEGER
user_control_flag(2)
This value specifies an array where offset 1 is a flag indicating that duplicate geometric entities should always be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 2 is set to 1. Offset 2 is a flag indicating that duplicate geometric entities should never be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 1 is set to 1.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function does not provide any user input controls for the global model tolerance. Importing a CATIA model geometry file with control over the model tolerance can be done through the use of the function sgm_catia_access_v1.
This function will provide an information display listing the percentage of each entity type being read into Patran from the CATIA model geometry file. The geometry read from the CATIA model geometry file will be entered into the Patran database and be shown on the display.
Example:
Please see sgm_catia_access (p. 26) in the PCL Reference Manual Examples.
 
sgm_catia_access_v1
(file_name, group_name, group_name_length,entity_toggle_values, simply_trimmed, enable_tol_prompt, color_toggle_values, all_layers, active_layer, layer_numbers, model_type, number_of_groups, group_entity_ids, group_entity_values, group_color_values, active_layer_values, layer_pointers, group_layers, interactive_flag, user_control_flag)
 
Description:
This function is used to import a CATIA model geometry file while providing the user with control over the model tolerance.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
group_name[80]
This value specifies the name of the group to which the imported geometry will be added. Currently, this value is ignored.
INTEGER
group_name_length
This value specifies the number of characters in the group_name input value. Currently, this value is ignored.
LOGICAL
entity_toggle_values(18)
This value specifies an array used to select the geometry entity types to be imported where the offset into the array defines the entity type. The value at that offset will be set TRUE if that entity type is to be imported. Currently, these values are ignored.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces. Currently, this value is ignored.
LOGICAL
enable_tol_prompt
This value should be set to TRUE to enable prompting from the user for the global model tolerance or to FALSE to use the currently defined global model tolerance.
LOGICAL
color_toggle_values(14)
This value specifies an array that is used to set the overall color filter values. Currently, these values are ignored.
LOGICAL
all_layers
This value should be set to TRUE if all entities identified by the input value entity_toggle_values from all layers should be imported. Currently, this value is ignored.
LOGICAL
active_layer
This value should be set to TRUE if only the active or work layer entities will be imported. Currently, this value is ignored.
INTEGER
layer_numbers(256)
This value specifies an array that is used to set the layer values entered by the user for the overall layer filter. Currently, this value is ignored.
STRING
model_type[6]
This value specifies the CAD model type and should always be set to “catia”.
INTEGER
number_of_groups
This value specifies the number of groups defined. This input has a maximum value of 256.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array that is used to set the ID values for each user group. Currently, this value is ignored.
LOGICAL
group_entity_values(number_of_groups, 20)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type. Currently, these values are ignored.
LOGICAL
group_color_values(number_of_groups, 14)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type. Currently, these values are ignored.
LOGICAL
active_layer_values(number_of_groups)
This value specifies an array that is used by setting the value at an offset that corresponds to the offset for the group id in the group_entity_values input value to TRUE if an entity in the active layer is included in the group identified by the offset into the array. Currently, these values are ignored.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. This array can store values that range from 1 to (512 - number_of_groups). Currently, these values are ignored.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. Currently these values are ignored, allowing the array to be any size.
INTEGER
interactive_flag
This value is used to indicate if the import of the file is to take place in batch mode. Currently, this value is ignored.
INTEGER
user_control_flag(2)
This value specifies an array where offset 1 is a flag indicating that duplicate geometric entities should always be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 2 is set to 1. Offset 2 is a flag indicating that duplicate geometric entities should never be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 1 is set to 1.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function, sgm_catia_access_v1(), differs from the sgm_catia_access() function by providing the input value enable_tol_prompt to allow the user to have some control over the model tolerance used when the geometry file is imported.
This function will provide an information display listing the percentage of each entity type being read into Patran from the CATIA model geometry file. The geometry read from the CATIA model geometry file will be entered into the Patran database and be shown in the current viewport.
Example:
Please see sgm_catia_access_v1 (p. 28) in the PCL Reference Manual Examples.
sgm_catia_import
( file_name, simple_trim, solid_type, enable_tol_prompt )
 
Description:
This function will import CATXPRES catia geometry objects.
Input:
 
 
STRING
file_name[]
This value specifies the name of the CATXPRES file to import.
LOGICAL
simple_trim
This value specifies, when set to TRUE, that the Catia surfaces will be converted to Patran simple trimmed surfaces. When set to FALSE, the Catia surfaces will be converted to Patran general trimmed surfaces.
INTEGER
solid_Type
This value specifes, when set to 1 that all solids will be converted to Patran brep solids. When this value is set to 2, all solids will be converted to Patran tri-parametric solids.
LOGICAL
enable_tol_prompt
This value specifies, when set to TRUE, to prompt users to decide to use the Patran default or model tolerance. When set to FALSE, the Patran model tolerance will be used.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
None.
Remarks:
None
Example:
None
 
sgm_euclid_access
(file_name, group_name, group_name_length,entity_toggle_values, simply_trimmed, color_toggle_values, all_layers, active_layer, layer_numbers, model_type, number_of_groups, group_entity_ids, group_entity_values, group_color_values, active_layer_values, layer_pointers, group_layers, interactive_flag, user_control_flag)
 
Description:
This function is used to import a EUCLID model geometry file but has no control over the model tolerance.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
group_name[80]
This value specifies the name of the group to which the imported geometry will be added. Currently, this value is ignored.
INTEGER
group_name_length
This value specifies the number of characters in the group_name input value. Currently, this value is ignored.
LOGICAL
entity_toggle_values(18)
This value specifies an array used to select the geometry entity types to be imported where the offset into the array defines the entity type. The value at that offset will be set TRUE if that entity type is to be imported. Currently, these values are ignored.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces. Currently, this value is ignored.
LOGICAL
color_toggle_values(14)
This value specifies an array that is used to set the overall color filter values. Currently, these values are ignored.
LOGICAL
all_layers
This value should be set to TRUE if all entities identified by the input value entity_toggle_values from all layers should be imported. Currently, this value is ignored.
LOGICAL
active_layer
This value should be set to TRUE if only the active or work layer entities will be imported. Currently, this value is ignored.
INTEGER
layer_numbers(256)
This value specifies an array that is used to set the layer values entered by the user for the overall layer filter. Currently, this value is ignored.
STRING
model_type[6]
This value specifies the CAD model type and should always be set to “euclid”.
INTEGER
number_of_groups
This value specifies the number of groups defined. This input has a maximum value of 256. Currently, this value is ignored.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array that is used to set the ID values for each user group. Currently, this value is ignored.
LOGICAL
group_entity_values(number_of_groups, 20)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type. Currently, these values are ignored.
LOGICAL
group_color_values(number_of_groups, 14)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type. Currently, these values are ignored.
LOGICAL
active_layer_values(number_of_groups)
This value specifies an array that is used by setting the value at an offset that corresponds to the offset for the group id in the group_entity_values input value to TRUE if an entity in the active layer is included in the group identified by the offset into the array. Currently, these values are ignored.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. This array can store values that range from 1 to (512 - number_of_groups). Currently, these values are ignored.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. Currently these values are ignored, allowing the array to be any size.
INTEGER
interactive_flag
This value is used to indicate if the import of the file is to take place in batch mode. Currently, this value is ignored.
INTEGER
user_control_flag(2)
This value specifies an array where offset 1 is a flag indicating that duplicate geometric entities should always be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 2 is set to 1. Offset 2 is a flag indicating that duplicate geometric entities should never be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 1 is set to 1.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function does not provide any user input controls for the global model tolerance. Importing a EUCLID model geometry file with control over the model tolerance can be done through the use of the sgm_euclid_access_v1 function.
This function will provide an information display listing the percentage of each entity type being read into Patran from the EUCLID model geometry file. The geometry read from the EUCLID model geometry file will be entered into the Patran database and be shown on the display.
Example:
Please see sgm_euclid_access (p. 30) in the PCL Reference Manual Examples.
 
sgm_euclid_access_v1
(file_name, group_name, group_name_length,entity_toggle_values, simply_trimmed, enable_tol_prompt, color_toggle_values, all_layers, active_layer, layer_numbers, model_type, number_of_groups, group_entity_ids, group_entity_values, group_color_values, active_layer_values, layer_pointers, group_layers, interactive_flag, user_control_flag)
 
Description:
This function is used to import a EUCLID model geometry file while providing the user with control over the model tolerance.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
group_name[80]
This value specifies the name of the group to which the imported geometry will be added. Currently, this value is ignored.
INTEGER
group_name_length
This value specifies the number of characters in the group_name input value. Currently, this value is ignored.
LOGICAL
entity_toggle_values(18)
This value specifies an array used to select the geometry entity types to be imported where the offset into the array defines the entity type. The value at that offset will be set TRUE if that entity type is to be imported. Currently, these values are ignored.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces. Currently, this value is ignored.
LOGICAL
enable_tol_prompt
This value should be set to TRUE to enable prompting from the user for the global model tolerance or to FALSE to use the currently defined global model tolerance.
LOGICAL
color_toggle_values(14)
This value specifies an array that is used to set the overall color filter values. Currently, these values are ignored.
LOGICAL
all_layers
This value should be set to TRUE if all entities identified by the input value entity_toggle_values from all layers should be imported. Currently, this value is ignored.
LOGICAL
active_layer
This value should be set to TRUE if only the active or work layer entities will be imported. Currently, this value is ignored.
INTEGER
layer_numbers(256)
This value specifies an array that is used to set the layer values entered by the user for the overall layer filter. Currently, this value is ignored.
STRING
model_type[6]
This value specifies the CAD model type and should always be set to “euclid”.
INTEGER
number_of_groups
This value specifies the number of groups. This input value has a maximum value of 256. Currently, this value is ignored.
INTEGER
group_entity_ids(number_of_groups)
This array specifies the ID values for each user group. Currently, this value is ignored.
LOGICAL
group_entity_values(number_of_groups, 20)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type. Currently, these values are ignored.
LOGICAL
group_color_values(number_of_groups, 14)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type. Currently, these values are ignored.
LOGICAL
active_layer_values(number_of_groups)
This value specifies an array that is used by setting the value at an offset that corresponds to the offset for the group id in the group_entity_values input value to TRUE if an entity in the active layer is included in the group identified by the offset into the array. Currently, these values are ignored.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. This array can store values that range from 1 to (512 - number_of_groups). Currently, these values are ignored.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. Currently these values are ignored, allowing the array to be any size.
INTEGER
interactive_flag
This value is used to indicate if the import of the file is to take place in batch mode. Currently, this value is ignored.
INTEGER
user_control_flag(2)
This value specifies an array where offset 1 is a flag indicating that duplicate geometric entities should always be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 2 is set to 1. Offset 2 is a flag indicating that duplicate geometric entities should never be created. This value should be initialized to 0 and should always be set to 0 if the value at offset 1 is set to 1.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
None.
This is only a partial list of the error values that can be returned by this function.
1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function, sgm_euclid_access_v1(), differs from the sgm_euclid_access() function by providing the input value enable_tol_prompt to allow the user to have some control over the model tolerance used when the geometry file is imported.
This function will provide an information display listing the percentage of each entity type being read into Patran from the EUCLID model geometry file. The geometry read from the EUCLID model geometry file will be entered into the Patran database and be shown in the current viewport.
Example:
Please see sgm_euclid_access_v1 (p. 31) in the PCL Reference Manual Examples.
 
sgm_ptc_access_v2
(file_name, file_type, simply_trimmed, create_groups, save_geo_file, enable_tol_prompt, pro_entities, pro_count, patran_count)
 
Description:
This function is used to import a Pro/ENGINEER model geometry file.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
file_type[3]
This value specifies the geometry file type and can have the following case insensitive values: “PRT”, “ASM”, and “GEO”.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces.
LOGICAL
create_groups
This value should be set to TRUE if Patran groups are to be created from Pro/ENGINEER parts in an assembly listed in the imported file.
LOGICAL
save_geo_file
This value should be set to TRUE if the .geo file is to be saved after accessing the .prt or .asm file.
LOGICAL
enable_tol_prompt
This value should be set to TRUE to enable prompting from the user for the global model tolerance or to FALSE to use the currently defined global model tolerance.
INTEGER
pro_entities (17)
This value specifies the Pro/ENGINEER entities to access. See the remarks below for more information.
Output:
INTEGER
pro_count(9)
This value returns an array listing the counts of Pro/ENGINEER entities that were in the imported file versus the counts of entities that were processed. See the remarks below for more information.
INTEGER
patran_count(7)
This value returns an array listing the number of Patran entities created. See the remarks below for more information.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value file_type can have the following values: “PRT”, “ASM”, “GEO”. This string value is not case sensitive.
The input value pro_entities uses offset 1 to specify the number of entities. Offsets 2 through 17 can be set to a value that identifies the entity type:
Table 2‑1
Entity type
Array value
Solid Face
1
Datum Point
2
Datum Curve
3
Datum Surface
4
Plane
108
Spline Surface
114
Ruled Surface
118
Surface of Revolution
120
Tabulated Cylinder
122
B_Spline Surface
128
Cylinder
154
Cone
156
Torus
160
Coons Patch
170
Fillet Surface
172
Cylindrical Spline Surface
174
The integer output array pro_count returns values where the offsets identify the following type of entities
Table 2‑2
Array offset
Entity type
1
Face Count
2
Point Count
3
Curve Count
4
Surface Count
5
Number of parts
6
Number of faces Processed
7
Number of points Processed
8
Number of curves Processed
9
Number of surfaces Processed
The integer output array patran_count returns values where the offsets identify the following type
of entities:
Table 2‑3
Array offset
Entity type
1
Trimmed Surface Count
2
Number of points Processed
3
Number of curves Processed
4
Number of surfaces Processed
5
The Parent Surface Count
6
Trimmed Curve Count
7
Number of groups
 
This function will import model geometry from the specified file, place it in the database and display it in the current viewport.
This function can display fatal popup forms with the following messages:
38000802
Unable to acquire Pro/ENGINEER Geometry file size.
38000803
Unable to read Pro/ENGINEER Geometry file%A%.
38000805
Unable to acquire%I% words of virtual memory.
38000819
The file type%A% is not a valid Pro/ENGINEER file type. Input either PRT, ASM, or GEO.
This function can display informational popup forms with the following messages:
 
38000821
Importing Pro/ENGINEER Part File.
38000823
Adding geometry to group%A%.
38000826
Patran ProENGINEER Access Model Import Terminated.
This function can display warning popup forms with the following messages:
38000828
A total of%I% surface contours were not closed in real (3D) space. The maximum gap distance was%G%. Try setting the Global Model Tolerance in the Global Preferences to a value greater than the gap distance and try again.
This function displays a warning popup form showing the message associated with the status value returned by the function:
ga_group_current_set()
Example:
Please see sgm_ptc_access_v2 (p. 35) in the PCL Reference Manual Examples.
 
sgm_ptc_access_v4
(file_name, file_type, simply_trimmed, create_groups, save_geo_file, tol_prompt_on, as_solid, pro_entities, pro_count, patran_count)
 
Description:
This function is used to import a Pro/ENGINEER model geometry file.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
file_type[3]
This value specifies the geometry file type and can have the following case insensitive values: “PRT”, “ASM”, and “GEO”.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces.
LOGICAL
create_groups
This value should be set to TRUE if Patran groups are to be created from Pro/ENGINEER parts in an assembly listed in the imported file.
LOGICAL
save_geo_file
This value should be set to TRUE if the .geo file is to be saved after accessing the .prt or .asm file.
LOGICAL
tol_prompt_on
This value should be set to TRUE to enable prompting from the user for the global model tolerance or to FALSE to use the currently defined global model tolerance.
LOGICAL
as_solid
This value should be set to TRUE if a B-rep is to be imported as a Solid or to FALSE if a B-rep is to be imported as a set of constituent surfaces.
INTEGER
pro_entities (19)
This value specifies the Pro/ENGINEER entities to access. See the remarks below for more information.
Output:
INTEGER
pro_count(13)
This value returns an array listing the counts of Pro/ENGINEER entities that were in the imported file versus the counts of entities that were processed. See the remarks below for more information.
INTEGER
patran_count(10)
This value returns an array listing the number of Patran entities created. See the remarks below for more information.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value file_type can have the following values: “PRT”, “ASM”, “GEO”. This string value is not case sensitive.
The input value pro_entities uses offset 1 to specify the number of entities. Offsets 2 through 17 can be set to a value that identifies the entity type:
 
Table 2‑4
Entity type
Array value
Solid Face
10
Datum Point
1
Datum Curve
2
Datum Surface
4
Datum Plane
8
Coord Sys Datum
16
Plane
108
Spline Surface
114
Ruled Surface
118
Surface of Revolution
120
Tabulated Cylinder
122
B_Spline Surface
128
Cylinder
154
Cone
156
Torus
160
Coons Patch
170
Fillet Surface
172
Cylindrical Spline Surface
174
The integer output array pro_count returns values where the offsets identify the following type of entities
Table 2‑5
Array offset
Entity type
1
Face count
2
Point count
3
Curve count
4
Surface count
5
Plane count
6
Coordinate System count
7
Number of parts
8
Number of faces processed
9
Number of points processed
10
Number of curves processed
11
Number of surfaces processed
12
Number of planes processed
13
Number of coordinate systems processed
:
The integer output array patran_count returns values where the offsets identify the following type
of entities:
Table 2‑6
Array offset
Entity type
1
Trimmed Surface count
2
Number of points processed
3
Number of curves processed
4
Number of surfaces processed
5
The Solid count
6
Number of planes processed
7
Number of coordinate systems processed
8
The Parent Surface count
9
Trimmed Curve count
10
Number of groups
 
This function will import model geometry from the specified file, place it in the database and display it in the current viewport.
This function can display fatal popup forms with the following messages:
38000802
Unable to acquire Pro/ENGINEER Geometry file size.
38000803
Unable to read Pro/ENGINEER Geometry file%A%.
38000805
Unable to acquire%I% words of virtual memory.
38000819
The file type%A% is not a valid Pro/ENGINEER file type.
Input either PRT, ASM, or GEO.
This function can display informational popup forms with the following messages:
 
38000821
Importing Pro/ENGINEER Part File.
38000823
Adding geometry to group%A%.
38000826
Patran ProENGINEER Access Model Import Terminated.
This function can display warning popup forms with the following messages:
38000828
A total of%I% surface contours were not closed in real (3D) space. The maximum gap distance was%G%. Try setting the Global Model Tolerance in the Global Preferences to a value greater than the gap distance and try again.
This function displays a warning popup form showing the message associated with the status value returned by the function:
ga_group_current_set()
Example:
None.
 
sgm_ptc_access_v5
(file_name, file_type, simply_trimmed, create_groups, save_geo_file, tol_prompt_on, as_solid, pro_entities, pro_count, patran_count)
Description:
This function is used to import a Pro/ENGINEER model geometry file.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
file_type[3]
This value specifies the geometry file type and can have the following case insensitive values: “PRT”, “ASM”, and “GEO”.
LOGICAL
simply_trimmed
This value should be set to TRUE to import all surfaces as simple trimmed surfaces or to FALSE to import all surfaces as general trimmed surfaces.
LOGICAL
create_groups
This value should be set to TRUE if Patran groups are to be created from Pro/ENGINEER parts in an assembly listed in the imported file.
LOGICAL
save_geo_file
This value should be set to TRUE if the .geo file is to be saved after accessing the .prt or .asm file.
LOGICAL
tol_prompt_on
This value should be set to TRUE to enable prompting from the user for the global model tolerance or to FALSE to use the currently defined global model tolerance.
LOGICAL
as_solid
This value should be set to TRUE if a B-rep is to be imported as a Solid or to FALSE if a B-rep is to be imported as a set of constituent surfaces.
INTEGER
pro_entities (20)
This value specifies the Pro/ENGINEER entities to access. See the remarks below for more information.
Output:
INTEGER
pro_count(15)
This value returns an array listing the counts of Pro/ENGINEER entities that were in the imported file versus the counts of entities that were processed. See the remarks below for more information.
INTEGER
patran_count(11)
This value returns an array listing the number of Patran entities created. See the remarks below for more information.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value file_type can have the following values: “PRT”, “ASM”, “GEO”. This string value is not case sensitive.
The input value pro_entities uses offset 1 to specify the number of entities. Offsets 2 through 17 can be set to a value that identifies the entity type:
Table 2‑7
Entity type
Array value
Solid Face
10
Datum Point
1
Datum Curve
2
Datum Surface
4
Datum Plane
8
Coord Sys Datum
16
Material
32
Plane
108
Spline Surface
114
Ruled Surface
118
Surface of Revolution
120
Tabulated Cylinder
122
B_Spline Surface
128
Cylinder
154
Cone
156
Torus
160
Coons Patch
170
Fillet Surface
172
Cylindrical Spline Surface
174
The integer output array pro_count returns values where the offsets identify the following type of entities
Table 2‑8
Array offset
Entity type
1
Face count
2
Point count
3
Curve count
4
Surface count
5
Plane count
6
Coordinate System count
7
Material count
8
Number of parts
9
Number of faces processed
10
Number of points processed
11
Number of curves processed
12
Number of surfaces processed
13
Number of planes processed
14
Number of coordinate systems processed
15
Number of materials processed
The integer output array patran_count returns values where the offsets identify the following type
of entities:
Table 2‑9
Array offset
Entity type
1
Trimmed Surface count
2
Number of points processed
3
Number of curves processed
4
Number of surfaces processed
5
The Solid count
6
Number of planes processed
7
Number of coordinate systems processed
8
The Parent Surface count
9
Trimmed Curve count
10
Number of groups
11
Number of materials processed
 
This function will import model geometry from the specified file, place it in the database and display it in the current viewport.
This function can display fatal popup forms with the following messages:
38000802
Unable to acquire Pro/ENGINEER Geometry file size.
38000803
Unable to read Pro/ENGINEER Geometry file%A%.
38000805
Unable to acquire%I% words of virtual memory.
38000819
The file type%A% is not a valid Pro/ENGINEER file type. Input either PRT, ASM, or GEO.
This function can display informational popup forms with the following messages:
38000821
Importing Pro/ENGINEER Part File.
38000823
Adding geometry to group%A%.
38000826
Patran ProENGINEER Access Model Import Terminated.
This function can display warning popup forms with the following messages:
38000828
A total of%I% surface contours were not closed in real (3D) space. The maximum gap distance was%G%. Try setting the Global Model Tolerance in the Global Preferences to a value greater than the gap distance and try again.
38000847
The Material assigned to part %A% in Pro/ENGINEER was not written to the Patran database because a solid did not get created.
38000848
Error occurred ateempting to write the Material %A% assigned to aprt %A% in Pro/ENGINEER to solid %l% in the Patran database.
This function displays a warning popup form showing the message associated with the status value returned by the function:
ga_group_current_set()
Example:
None
 
uil_db_commit
(command)
 
Description:
This function will submit the last database transaction so that it cannot be undone and set the description string to be used with the undone operation.
Input:
STRING
command[]
This value specifies a description of current command to be used in the message when the command is undone.
Output:
None.
Error Conditions:
None.
Remarks:
The results of prior database operations are set so that only the database transactions from this point on can be undone.
This routine should be called in the callback for the “Apply” button in a popup form used to control an application or at the beginning of a logical command.
Example:
Please see uil_db_commit (p. 36) in the PCL Reference Manual Examples.
 
uil_db_undo
()
 
Description:
This function will undo the last database transaction.
Input:
None.
Output:
None.
Error Conditions:
None.
Remarks:
All database operations done since the last call to the uil_db_commit() function will be thrown away. The recording session file will be updated from the point of the last call to the uil_db_commit() function.
Example:
Please see uil_db_undo (p. 37) in the PCL Reference Manual Examples.
  
uil_file_close.go
()
 
Description:
This function will close a database.
Input:
None.
Output:
None.
Error Conditions:
None.
Remarks:
Executing this function will close all viewports and forms with the exception of the main form.
Example:
Please see uil_file_close.go (p. 38) in the PCL Reference Manual Examples.
 
uil_file_new.go
(template_name, file_name)
 
Description:
This function will create and open a new database using the specified database and template file name.
Input:
STRING
template_name[256]
This value specifies the name of database to be used as the template. If this value is set to “”, the P3_HOME/template.db file will be used.
STRING
file_name[256]
This value specifies the name of the database to be created.
Output:
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
8111002
File%A% is in use by another user. Opening this database may cause undesirable results. Do you wish to continue anyway?
36000001
Cannot open database%A%.A database is already open.
36000002
Database%A% already exists.Do you wish to delete the existing database and create a new one?
Remarks:
Using this function to create databases across machine-type boundaries is not recommended.
The database files created by this function may not be compatible from machine type to machine type.
This function can display yes/no query popup forms with the messages:
8111002
File%A% is in use by another user. Opening this database may cause undesirable results. Do you wish to continue anyway?
36000002
Database%A% already exists. Do you wish to delete the existing database and create a new one?
This function can display a fatal popup form with the message:
 
36000001
Cannot open database%A%.A database is already open.
This function will write comments to the journal and session files.
Example:
Please see uil_file_new.go (p. 39) in the PCL Reference Manual Examples.
 
uil_file_open.go
(file_name)
 
Description:
This function will open a database.
Input:
STRING
file_name[256]
This value specifies the name of the database to open.
Output:
None.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
8111002
File%A% is in use by another user. Opening this database may cause undesirable results. Do you wish to continue anyway?
36000001
Cannot open database%A%.A database is already open.
36000002
Database%A% already exists.Do you wish to delete the existing database and create a new one?
36000003
Database%A% does not exist.Do you wish to create a new database?
Remarks:
Using this function to open a database created on a machine of a different type is not recommended.
This function can display a fatal popup form with the message:
 
36000001
Cannot open database%A%.A database is already open.
This function can display a warning popup form with the message:
 
39000004
Journal file%A% does not exist. No journal file will be created.
This function can display yes/no query popup forms with the messages:
 
36000003
Database%A% does not exist.Do you wish to create a new database?
This function may not be able to open database files that have been transferred from one machine type to another.
A viewport for the loaded database file will be displayed and the preferences will be set using information from the opened database.
Example:
Please see uil_file_open.go (p. 40) in the PCL Reference Manual Examples.
 
uil_imaging_coordframes.post_cf
(contents)
 
Description:
This function will post the selected coordinate frames to all viewports.
Input:
STRING
contents[]
This value specifies a list of coordinate frame identifiers to post to all viewports.
Output:
None.
Error Conditions:
None
Remarks:
This function can display a warning popup form with the message:
 
11005001
Global Coordinate Frame 0 (Global Axes Display) is controlled per viewport via the Viewport Modify form.
This function can display a fatal popup form with the following messages:
14000001
LpGetHeapSpace: Allocated heap space is exhausted
14000049
LpParseExpression: Excess left parenthesis detected.
14000050
LpParseExpression: Excess right parenthesis detected.
14000281
LpExpandPclVariables: Virtual memory is full.
14000308
LpEval: Memory exhausted preparing to evaluate pick.
This function calls and can display the status value returned by the following function in a warning
popup form.
db_post_coord()
This function calls but does not return the status values returned by the following functions:
app_get_handle()
app_next_label()
Example:
Please see uil_imaging_coordframes.post_cf (p. 40) in the PCL Reference Manual Examples.
 
uil_imaging_coordframes.unpost_cf
(contents)
 
Description:
This function will unpost the selected coordinate frames to all viewports.
Input:
STRING
contents[]
This value specifies a list of coordinate frame identifiers to unpost from all viewports.
Output:
None.
Error Conditions:
None.
Remarks:
This function can display a fatal popup form with the following messages:
14000001
LpGetHeapSpace: Allocated heap space is exhausted
14000049
LpParseExpression: Excess left parenthesis detected.
14000050
LpParseExpression: Excess right parenthesis detected.
14000281
LpExpandPclVariables: Virtual memory is full.
14000308
LpEval: Memory exhausted preparing to evaluate pick.
This function can display a warning popup form with the message:
11005001
Global Coordinate Frame 0 (Global Axes Display) is controlled per viewport via the Viewport Modify form.
This function calls but does not return the status values returned by the following functions:
app_get_handle()
app_next_label()
Example:
Please see uil_imaging_coordframes.unpost_cf (p. 42) in the PCL Reference Manual Examples.
 
uil_primary.get_menubar_id
()
 
Description:
This function returns the widget value for the Patran menu bar.
Input:
None.
Output:
widget
<Return Value>
This value returns the widget identifier for the main menu bar.
Error Conditions:
None.
Remarks:
This function can be called from or after the p3epilog.pcl start-up file has been run by the init.pcl file. Calling it before the p3epilog.pcl file has been run may cause allow an invalid widget id to
be returned.
Example:
Please see uil_primary.get_menubar_id (p. 43) in the PCL Reference Manual Examples.
 
uil_viewport_tiling.tile
()
 
Description:
This function tiles or places in a side by side arrangement up to four posted viewports.
Input:
None.
Output:
None.
Error Conditions:
None.
Remarks:
This function will display a warning popup form with the following message if more than four viewports are posted:
11003004
Unable to tile more than 4 Viewports.
This function will display a fatal popup form listing the message associated with the status returned by the following functions:
ga_viewport_location_get()
ga_viewport_location_set()
ga_viewport_nposted_get()
ga_viewport_posted_get()
ga_viewport_size_set()
This function will return immediately if Patran is being run in batch mode.
Example:
Please see uil_viewport_tiling.tile (p. 43) in the PCL Reference Manual Examples.
 
ugi_export_iges
(file_name, start_section, model_units, entity_values, all_groups, number_of_groups, group_entity_ids, patran_count, iges_count)
Description:
This function exports Patran geometry information from the database to a file in the IGES standard file format.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be created.
STRING
start_section[]
This value specifies the IGES file start section prolog lines.
STRING
model_units[]
This value specifies the IGES file model units.
LOGICAL
entity_values(7)
This value specifies the entity type filter status flags used to specify which Patran entity types will be exported to the IGES file.
LOGICAL
all_groups
This value is set to TRUE if all groups are to be exported to the IGES file.
INTEGER
number_of_groups
This value specifies the number of Patran groups to be exported to the IGES file.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array containing the IDs of the Patran groups to be exported to the IGES file.
Output:
INTEGER
patran_count(7)
This value returns a list of the number of Patran entities processed from the database by type.
INTEGER
iges_count(20)
This value returns the number of IGES entities created by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
 
Remarks:
This function can display information popup forms with the following messages:
 
38000597
Exporting%I% Patran Elements.
38000602
Creating%I% IGES file Parameter Data Records.
38000607
Exporting%I% Patran Elements by Group.
This function can display fatal popup forms with the following messages:
38000504
Unable to open scratch file.
38000505
Unable to open IGES file%A%.
38000805
Unable to acquire%I% words of virtual memory.
This function can display a query popup form with the following message:
36000005
%A% File%A% already exists.Do you wish to delete the existing%A% file and create a new one?
This function can display fatal popup forms listing the messages associated with the status values returned by a call to the function:
file_delete()
Example:
None
 
ugi_export_iges_v1
(file_name, start_section, nlpos, nlknt, product_id, author, author_org, model_units, entity_values, all_groups, number_of_groups, group_entity_ids, patran_count, iges_count)
 
Description:
This function exports Patran geometry information from the database to a file in the IGES standard file format.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be created.
STRING
start_section[]
This value specifies the IGES file start section prolog lines.
INTEGER
nlpos(*)
New line character (\n) positions in Start Section.
INTEGER
nlknt
Number of new line characters (\n) in Start Section.
STRING
product_id
Product Id for receiving system
STRING
author
Author
STRING
author_org
Author’s Organization
STRING
model_units[]
This value specifies the IGES file model units.
LOGICAL
entity_values(8)
This value specifies the entity type filter status flags used to specify which Patran entity types will be exported to the IGES file.
LOGICAL
all_groups
This value is set to TRUE if all groups are to be exported to the IGES file.
INTEGER
number_of_groups
This value specifies the number of Patran groups to be exported to the IGES file.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array containing the IDs of the Patran groups to be exported to the IGES file.
Output:
INTEGER
patran_count(8)
This value returns a list of the number of Patran entities processed from the database by type.
INTEGER
iges_count(21)
This value returns the number of IGES entities created by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function can display information popup forms with the following messages:
38000597
Exporting%I% Patran Elements.
38000602
Creating%I% IGES file Parameter Data Records.
38000607
Exporting%I% Patran Elements by Group.
This function can display fatal popup forms with the following messages:
38000504
Unable to open scratch file.
38000505
Unable to open IGES file%A%.
38000805
Unable to acquire%I% words of virtual memory.
This function can display a query popup form with the following message:
36000005
%A% File%A% already exists.Do you wish to delete the existing%A% file and create a new one?
This function can display fatal popup forms listing the messages associated with the status values returned by a call to the function:
Example:
None
 
ugi_export_iges_v2
(file_name, start_section, product_id, author, author_org, model_units, entity_values, all_groups, number_of_groups, group_entity_ids, patran_count, iges_count)
 
Description:
This function exports Patran geometry information from the database to a file in the IGES standard file format.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be created.
STRING
start_section[]
This value specifies the IGES file start section prolog lines.
STRING
product_id
Product Id for receiving system
STRING
author
Author
STRING
author_org
Author’s Organization
STRING
model_units[]
This value specifies the IGES file model units.
LOGICAL
entity_values(8)
This value specifies the entity type filter status flags used to specify which Patran entity types will be exported to the IGES file.
LOGICAL
all_groups
This value is set to TRUE if all groups are to be exported to the IGES file.
INTEGER
number_of_groups
This value specifies the number of Patran groups to be exported to the IGES file.
INTEGER
group_entity_ids(number_of_groups)
This value specifies an array containing the IDs of the Patran groups to be exported to the IGES file.
Output:
INTEGER
patran_count(8)
This value returns a list of the number of Patran entities processed from the database by type.
INTEGER
iges_count(21)
This value returns the number of IGES entities created by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
This function can display information popup forms with the following messages:
 
38000597
Exporting%I% Patran Elements.
38000602
Creating%I% IGES file Parameter Data Records.
38000607
Exporting%I% Patran Elements by Group.
This function can display fatal popup forms with the following messages:
38000504
Unable to open scratch file.
38000505
Unable to open IGES file%A%.
38000805
Unable to acquire%I% words of virtual memory.
This function can display a query popup form with the following message:
36000005
%A% File%A% already exists.Do you wish to delete the existing%A% file and create a new one?
This function can display fatal popup forms listing the messages associated with the status values returned by a call to the function:
Example:
None
 
ugi_import_iges
(file_name, group_name, entity_toggle_values, color_toggle_values, color_method, color_definition, all_layers, layer, number_of_groups, group_entity_ids, group_entity_values, group_color_values, layer_pointers, group_layers, scale, iges_count, patran_count)
 
Description:
This function imports geometry information from a file in the IGES standard file format into the Patran database.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
STRING
group_name[31]
This value specifies the name of the group to which the imported geometry will be added.
LOGICAL
entity_toggle_values(23)
This value specifies the entity type filter status flags to specify which IGES entity types to import.
LOGICAL
color_toggle_values(9)
This value defined the entity color filter status flags to specify which IGES entity colors to import.
STRING
color_method[7]
This value is used to specify the color definition entity method used to import color definition entities.
STRING
color_definition[]
This value specifies the color definition entities to import.
LOGICAL
all_layers
This value should be set to TRUE if all geometry layers are to be imported.
STRING
layer[]
This value specifies a string that is used to specify the geometry layers to be imported.
INTEGER
number_of_groups
This value is the number of groups defined.
INTEGER
group_entity_ids(number_of_groups)
This array specifies the ID values for each user group.
LOGICAL
group_entity_values(20, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type.
LOGICAL
group_color_values(10, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. The maximum value allowed for this array is equal to the number of integers in the group_layers input value.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. The size of this array must be equal to or greater than the largest value placed in the layer_pointers input value.
Output:
REAL
scale
This value returns the IGES file model space scale.
INTEGER
iges_count(20)
This value returns the number of IGES entities imported by type.
INTEGER
patran_count(8)
This value returns the number of Patran entities written to the database by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value color_method can have a value of “ALL”, “NONE”, or “SPECIFY”.
This function will provide information popup forms that list the number of IGES entities imported and Patran entities created.
The geometric entities placed in the Patran database will be displayed in the viewport.
Example:
Please see ugi_import_iges (p. 44) in the PCL Reference Manual Examples.
 
ugi_import_iges_v4
(file_name, group_name, entity_toggle_values, color_toggle_values, color_method, color_definition, all_layers, layer, number_of_groups, group_entity_ids, group_entity_values, group_color_values, layer_pointers, group_layers, scale, iges_count, patran_count)
 
Description:
This function imports geometry information from a file in the IGES standard file format into the Patran database.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
INTEGER
ipref142
User preference for Curve on Surface (142) entity representation use flag.
0 = Unspecified, use what is defined in the IGES file.
1 = S o B is preferred. (parametric space)
2 = C is preferred. (real space)
STRING
group_name[31]
This value specifies the name of the group to which the imported geometry will be added.
LOGICAL
entity_toggle_values(35)
This value specifies the entity type filter status flags to specify which IGES entity types to import.
LOGICAL
color_toggle_values(10)
This value defined the entity color filter status flags to specify which IGES entity colors to import.
STRING
color_method[10]
This value is used to specify the color definition entity method used to import color definition entities.
STRING
color_definition[]
This value specifies the color definition entities to import.
LOGICAL
all_layers
This value should be set to TRUE if all geometry layers are to be imported.
STRING
layer[]
This value specifies a string that is used to specify the geometry layers to be imported.
INTEGER
number_of_groups
This value is the number of groups defined.
INTEGER
group_entity_ids(number_of_groups)
This array specifies the ID values for each user group.
LOGICAL
group_entity_values(22, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type.
LOGICAL
group_color_values(10, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. The maximum value allowed for this array is equal to the number of integers in the group_layers input value.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. The size of this array must be equal to or greater than the largest value placed in the layer_pointers input value.
Output:
REAL
scale
This value returns the IGES file model space scale.
INTEGER
iges_count(50)
This value returns the number of IGES entities imported by type.
INTEGER
patran_count(9)
This value returns the number of Patran entities written to the database by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value color_method can have a value of “ALL”, “NONE”, or “SPECIFY”.
This function will provide information popup forms that list the number of IGES entities imported and Patran entities created.
The geometric entities placed in the Patran database will be displayed in the viewport.
Example:
Please see ugi_import_iges (p. 44) in the PCL Reference Manual Examples.
 
ugi_import_iges_v5
(file_name, group_name, entity_toggle_values, color_toggle_values, color_method, color_definition, all_layers, layer, number_of_groups, group_entity_ids, group_entity_values, group_color_values, layer_pointers, group_layers, create_groups, groups_prefix, scale, iges_count, patran_count)
 
Description:
This function imports geometry information from a file in the IGES standard file format into the Patran database.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
INTEGER
ipref142
User preference for Curve on Surface (142) entity representation use flag.
0 = Unspecified, use what is defined in the IGES file.
1 = S o B is preferred. (parametric space)
2 = C is preferred. (real space)
STRING
group_name[31]
This value specifies the name of the group to which the imported geometry will be added.
LOGICAL
entity_toggle_values(35)
This value specifies the entity type filter status flags to specify which IGES entity types to import.
LOGICAL
color_toggle_values(10)
This value defined the entity color filter status flags to specify which IGES entity colors to import.
STRING
color_method[10]
This value is used to specify the color definition entity method used to import color definition entities.
STRING
color_definition[]
This value specifies the color definition entities to import.
LOGICAL
all_layers
This value should be set to TRUE if all geometry layers are to be imported.
STRING
layer[]
This value specifies a string that is used to specify the geometry layers to be imported.
INTEGER
number_of_groups
This value is the number of groups defined.
INTEGER
group_entity_ids(number_of_groups)
This array specifies the ID values for each user group.
LOGICAL
group_entity_values(22, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if an entity is to be included and FALSE if an entity is not to be included in the group being imported. The offset in the first dimension corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of the array identifies the entity type.
LOGICAL
group_color_values(10, number_of_groups)
This value specifies a two dimensional array that contains values set to TRUE if a color value is to be used. The offset in the first dimension of this array corresponds to the group id in the same offset of the group_entity_ids input value. The offset in the second dimension of this array identifies the color type.
INTEGER
layer_pointers(number_of_groups)
This value specifies an array that is used by setting a value at an offset that corresponds with the offset into the group_entity_ids input value that lists the group ids. The value at that offset in this array identifies the offset into the group_layers input value where the number of layer values for each group is stored. The maximum value allowed for this array is equal to the number of integers in the group_layers input value.
INTEGER
group_layers()
This value specifies an array used to identify the number of layers imported for each group. The size of this array must be equal to or greater than the largest value placed in the layer_pointers input value.
LOGICAL
create_groups
This value should be set to TRUE if Patran groups are to be created automatically from IGES layers.
STRING
groups_prefix
This value specifies the group names prefix if Patran groups are to be created automatically from IGES layers. If blank, the group names prefix will be the name of the IGES file imported.
Output:
REAL
scale
This value returns the IGES file model space scale.
INTEGER
iges_count(50)
This value returns the number of IGES entities imported by type.
INTEGER
patran_count(9)
This value returns the number of Patran entities written to the database by type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
-1
This is an internal status condition. There is no corresponding status message in the message database.
Remarks:
The input value color_method can have a value of “ALL”, “NONE”, or “SPECIFY”.
This function will provide information popup forms that list the number of IGES entities imported and Patran entities created.
The geometric entities placed in the Patran database will be displayed in the viewport.
Example:
Please see ugi_import_iges (p. 44) in the PCL Reference Manual Examples.
 
ugi_query_iges_v2
(file_name, query_options, create_report, report_name, entity_count, entity_attributes, num_colors, entity_colors, num_colors_per, num_layers, entity_layers, num_layers_per)
Description:
This function provides information on the contents of an IGES geometry file.
Input:
STRING
file_name[]
This value specifies the name of the path and the file to be imported.
LOGICAL
query_options(7)
This value specifies the types of query operations to perform. See the remarks below for more information.
LOGICAL
create_report
This value specifies, when set to TRUE, that the report information will be written to an Patran report file. When this value is set to FALSE, a report file will not be created.
STRING
report_name[]
This value specifies the name of the Patran report file to which query information is written.
Output:
INTEGER
entity_count
This value returns the number of IGES entities identified in the IGES geometry file.
INTEGER
entity_attributes(12,50)
This value returns the IGES entity attributes for each entity type. The use of this array is described in the remarks below.
INTEGER
num_colors(50)
This value returns the number of colors used by the IGES geometry file.
INTEGER
entity_colors(256,50)
This value returns the color numbers per entity type used by the IGES geometry file. See the remarks below for more information on the use of this value.
INTEGER
num_colors_per(256,50)
This value returns the number of colors per entity type used by the IGES geometry file.
INTEGER
num_layers(50)
This value reports the number of layers per entity type in the IGES geometry file.
INTEGER
entity_layers(256,50)
This value returns the layer numbers per entity type in the IGES geometry file.
INTEGER
num_layers_per(256,50)
This value returns the number of layers per entity type.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
See Status Messages for information on any error values returned by this function.
Remarks:
This function will provide an information display listing the contents of the IGES file.
The input value query_options uses the following offsets to control the type of information placed in a report. When the value at the offset is set to TRUE, the information will be placed in the report. When the value at the offset is set to FALSE, the listed information will be omitted from the report.
Table 2‑10
Offset
Description
1
Report the supported IGES entities.
2
Report the IGES geometric entities.
3
Report a tabulated summary of all IGES entities.
4
Report the visible geometric entities.
5
Report the supported IGES entities with subordinate switches.
6
Report the IGES entity color status.
7
Report the IGES entity level status.
The output value entity_attributes returns the IGES entity attributes for each entity type. Twelve different attributes are counted for 50 entity types. The second dimensional offsets (1-50) of this array are used to list the entity counts for each attribute. The first dimensional offsets in the array are used to identify the entity attributes as follows:
Table 2‑11
Offset
Description
1
This offset returns the entity type.
2
This offset returns the total number of entities.
3
This offset returns the number of visible entities.
4
This offset returns the number of model space entities.
5
This offset returns the number of parameter space entities.
6
This offset returns the subordinate switch entity value of 0.
7
This offset returns the subordinate switch entity value of 1.
8
This offset returns the subordinate switch entity value of 2.
9
This offset returns the subordinate switch entity value of 3.
10
This offset returns the number of annotation entities.
11
This offset is not used.
12
This offset returns the number of bounded plane entities.
The output value entity_colors returns the color numbers per entity type used by the IGES geometry file. If the color number is negative, its absolute value is an offset into the second dimension of the attributes returned by the output value entity_attributes where a color definition entity is used to define the color. The possible positive color numbers and their colors are:
Color Number
Color
0
No color assigned
1
Black
2
Red
3
Green
4
Blue
5
Yellow
6
Magenta
7
Cyan
8
White
Example:
None.
ge_export_xmt
(filnam, refittol, scale_factor, entity_values, patran_summary, para_summary)
Description:
This function will export Patran geometry to a Parasolid transmit file.
Input:
STRING
filnam[]
This value specifies the Parasolid transmit file name to create.
REAL
refittol
This value specifies the tolerance used to refit Patran geometry to Parasolid format.
The default value = geotol/scale_factor, where:
geotol = Global Modeling Tolerance
scale_factor = Geometry Scale Factor
REAL
scale_factor
This value specifies the Geometry Scale Factor used to convert Patran geometry into Parasolid units. The default value = 39.37
LOGICAL
entity_values(3)
This value specifies the types of Patran geometric entity types to export:
(1) = true if curves are to be exported.
(2) = true if surfaces are to be exported.
(3) = true if solids are to be exported.
Output:
INTEGER
patran_summary(3)
This value returns the number of patran geometric entity types exported:
(1) = number of curves exported.
(2) = number of surfaces exported.
(3) = number of solids exported.
INTEGER
para_summary(3)
This value returns the number of parasolid geometric entity types created:
(1) = number of parasolid curves created.
(2) = number of parasolid surfaces created.
(3) = number of parasolid solids created.
Error Conditions:
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
None.