Msc. Patran pcl handbook In a Nutshell 7
|
lp attribute Functions |
Use |
lp_sublist_attribute_get_int() |
Return an integer value from a Picklist with a specified attribute. |
lp_sublist_attribute_get_float() |
Return a real value of integer values from a Picklist with a specified attribute. |
lp_sublist_attribute_get_string() |
Return a string from a Picklist with a specified attribute. |
lp_sublist_attribute_get_inta() |
Return an array of integers from a Picklist with a specified attribute. |
lp_sublist_attribute_get_floata() |
Return a real array from a Picklist with a specified attribute. |
#define LP_ATTRIBUTE_ID #define LP_ATTRIBUTE_LABEL #define LP_ATTRIBUTE_GEOMETRY #define LP_ATTRIBUTE_GEOMETRY_TYPE #define LP_ATTRIBUTE_GEOMETRY_FORMAT #define LP_ATTRIBUTE_GEOMETRY_COMPANY_OF_ORIGIN #define LP_ATTRIBUTE_ORIGIN #define LP_ATTRIBUTE_ROTATION_MATRIX #define LP_ATTRIBUTE_COORDINATE_FRAME_TYPE #define LP_ATTRIBUTE_LOCATION #define LP_ATTRIBUTE_DISPLACEMENT #define LP_ATTRIBUTE_BASE #define LP_ATTRIBUTE_TIP #define LP_ATTRIBUTE_CLASS_NAME #define LP_ATTRIBUTE_TOPOLOGY_ID #define LP_ATTRIBUTE_DIMENSIONALITY #define LP_ATTRIBUTE_FACE_NUMBER #define LP_ATTRIBUTE_EDGE_NUMBER #define LP_ATTRIBUTE_VERTEX_NUMBER #define LP_ATTRIBUTE_NODE_COUNT #define LP_ATTRIBUTE_NODE_LIST #define LP_ATTRIBUTE_ORIGINAL_PARSE_CLASS |
#define LP_ATTRIBUTE_ORIGINAL_PARSE_SUBCLASS #define LP_ATTRIBUTE_ORIGINAL_PARSE_SUBCLASS_ID #define LP_ATTRIBUTE_GEOMETRY_IN_NATIVE_FORM #define LP_ATTRIBUTE_U_VALUE #define LP_ATTRIBUTE_V_VALUE #define LP_ATTRIBUTE_TOKEN_VALUE #define LP_ATTRIBUTE_EVALUATED_POINT #define LP_ATTRIBUTE_POINT_COUNT #define LP_ATTRIBUTE_CURVE_COUNT #define LP_ATTRIBUTE_SURFACE_COUNT #define LP_ATTRIBUTE_SOLID_COUNT #define LP_ATTRIBUTE_POINT_LIST #define LP_ATTRIBUTE_CURVE_LIST #define LP_ATTRIBUTE_SURFACE_LIST #define LP_ATTRIBUTE_SOLID_LIST #define LP_ATTRIBUTE_SIDE_NUMBER #define LP_ATTRIBUTE_NORMAL #define LP_ATTRIBUTE_PLANE_COUNT #define LP_ATTRIBUTE_PLANE_LIST #define LP_ATTRIBUTE_VECTOR_COUNT #define LP_ATTRIBUTE_VECTOR_LIST |
#define LP_ATTRIBUTE_ORIGINAL_PARSE_SUBCLASS_TOPOLOGICAL_CONTEXT |
Functions |
Use |
lp_print_list() |
Print the entire Picklist from the anchor block to standard out. Prints to stdout. |
lp_print_sublist() |
Print the sublist prepared by lp_sublist_type from the anchor block to standard out. Good for determining the attributes associated with a sublist item. |
lp_eval_cleanup() |
Frees allocated memory for list processor operations. This should be performed after lp_ operations are complete |
lp_sublist_reset() |
Reset the sublist parser to resume parsing the original Picklist. |
fem_u_count_id_list() |
Quick function to count the entities of a specified list processor sublist type without having to use all the other lp_ commands. |
fem_u_extract_node_ids() |
Quick function to extract the array of nodes IDs from a Picklist. |
fem_u_get_id_list() |
Quick function to return the entities ids of a specified list processor sublist type without having to use all the other lp_ commands. |
app_count_id_list() |
Count the entities of a specified list processor type in a list using the picklist decoder routines. |
SubList |
Attribute Definition |
Point |
Sublist Eval: LP_EVAL_FOR_GEOMETRY |
Label 2 |
LP_ATTRIBUTE_LABEL |
Id 2 |
LP_ATTRIBUTE_ID |
GeometryInNativeForm [0. 0. 0. 0. 1. 0.] |
LP_ATTRIBUTE_GEOMETRY_IN_NATIVE_FORM |
GeometryType CartesianPoint |
LP_ATTRIBUTE_GEOMETRY_TYPE |
GeometryCompanyOfOrigin PATRAN |
LP_ATTRIBUTE_GEOMETRY_COMPANY_OF_ORIGIN |
EvaluatedPoint [0.0 1.0 0.0] |
LP_ATTRIBUTE_EVALUATED_POINT |
|
|
Element |
Sublist Eval: LP_EVAL_FOR_FEM_DEFINITION |
Id 50 |
LP_ATTRIBUTE_LABEL |
ClassName Bar2 |
LP_ATTRIBUTE_CLASS_NAME |
TopologyId 2 |
LP_ATTRIBUTE_TOPOLOGY_ID |
Dimensionality 1 |
LP_ATTRIBUTE_DIMENSIONALITY |
NodeCount 2 |
LP_ATTRIBUTE_NODE_COUNT |
NodeList [58 57] |
LP_ATTRIBUTE_NODE_LIST |
|
|
Node |
Sublist Eval: LP_EVAL_FOR_FEM_DEFINITION |
Id 12 |
LP_ATTRIBUTE_LABEL |
Location [0.428571 0.142857 0.000000] |
LP_ATTRIBUTE_LOCATION |
|
|
* This function returns the node labels and count
* from the picklist of a select databox.
*
* INPUT: select databox widget ID
* OUTPUT: node_labels INTEGER ARRAY Node labels
* num_nodes INTEGER Number of nodes found
*
* This function is the equivalent of fem_u_extract_nodes_ids
* Equivalent procedure:
*
* ui_wid_get(sdbox,"VALUE",picklist)
* sys_allocate_array(node_labels,1,num_nodes)
* fem_u_extract_node_ids(picklist,num_nodes,node_labels)
*
*/
INTEGER num_nodes, node_labels()
INTEGER i, status
INTEGER list_type, handle, id(1), ints(2)
INTEGER node_ids(VIRTUAL)
LOGICAL end_of_list = FALSE
REAL reals(2)
STRING picklist[VIRTUAL], str[10](2)
ui_wid_get_vstring(sdbox_wid, ”VALUE”, picklist)
$ This line evaluates the pick list for labels and returns a handle
lp_eval(picklist, LP_EVAL_FOR_LABEL, handle)
lp_sublist_count(handle, LP_SUBLIST_NODE, num_nodes)
sys_allocate_array(node_ids, 1, num_nodes)
write("Node count = "//str_from_integer(num_nodes))
ELSE
END IF
i = 0
REPEAT
status = lp_sublist_type(handle, LP_SUBLIST_ANY, list_type)
lp_print_sublist(handle)
msg_to_form(status, 3, 0, ints, reals, str)
RETURN (-1)
END IF
i += 1
node_ids(i) = id
END IF
/* Get the next node */
status = lp_sublist_next(handle)
IF (status != 0 ) then
end_of_list = TRUE
END IF
UNTIL(i == num_nodes || end_of_list)
sys_allocate_array(node_labels, 1, num_nodes)
None
None
None
None
None
None
None
Shift
None
Shift
None
Shift
Ctrl
Alt
Ctrl
Alt
Ctrl
Alt
None
Shift
Ctrl
None
None
None
None
None
None
None
None
None
“my_opt_menu_cb”, x_loc, y_loc, 0, @