ITK Function Reference

(V10000.1.0.60_20160308.00)
me.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2003-2005 UGS Corporation
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
12 /* */
13 
14 #ifndef ME_H
15 #define ME_H
16 
17 #include <fclasses/tc_basic.h>
18 #include <me/libme_exports.h>
19 
20 
30 #define ME_meprocess_class_name_c "MEProcess"
31 #define ME_meop_class_name_c "MEOP"
32 #define ME_meprocess_rev_class_name_c "MEProcessRevision"
33 #define ME_meop_rev_class_name_c "MEOPRevision"
34 #define ME_activity_class_name_c "MEActivity"
35 #define ME_meworkarea_class_name_c "MEWorkarea"
36 #define ME_meworkarea_rev_class_name_c "MEWorkareaRevision"
37 #define ME_meappearancepathnode_class_name_c "MEAppearancePathNode"
38 #define ME_meappearancepathroot_class_name_c "MEAppearancePathRoot"
39 #define ME_placeholder_item_id_c "MEAppGroupPlaceholder"
40 #define ME_placeholder_item_id_c "MEAppGroupPlaceholder"
41 #define ME_appearance_group_class_name_c "AppearanceGroup"
42 #define ME_component_relation_class_name_c "ComponentRelation"
43 
49 #define ME_mestation_type_name_c "MEStation"
50 #define ME_mestation_rev_type_name_c "MEStationRevision"
51 #define ME_meline_type_name_c "MELine"
52 #define ME_meline_rev_type_name_c "MELineRevision"
53 #define ME_meplant_type_name_c "MEPlant"
54 #define ME_meplant_rev_type_name_c "MEPlantRevision"
55 #define ME_medepartment_type_name_c "MEDepartment"
56 #define ME_medepartment_rev_type_name_c "MEDepartmentRevision"
57 #define ME_mesite_type_name_c "MESite"
58 #define ME_mesite_rev_type_name_c "MESiteRevision"
59 #define ME_machining_type_name_c "MENCMachining"
60 #define ME_machining_rev_type_name_c "MENCMachining Revision"
61 #define ME_ncprogram_type_name_c "MENCProgram"
62 #define ME_workpiece_type_name_c "MEWorkpiece"
63 #define Usage_compareResultView_type_name_c "UsageCompareResultView"
64 #define ME_appgrp_app_relation_type_name_c "IMAN_MEComponent"
65 #define ME_meproductlocation_type_name_c "MEProductLocation"
66 #define ME_meproductlocation_rev_type_name_c "MEProductLocationRevision"
67 #define ME_medrill_type_name_c "MEDrill"
68 #define ME_medrill_rev_type_name_c "MEDrillRevision"
69 #define ME_meedm_type_name_c "MEEDM"
70 #define ME_meedm_rev_type_name_c "MEEDMRevision"
71 #define ME_memilling_type_name_c "MEMilling"
72 #define ME_memilling_rev_type_name_c "MEMilling Revision"
73 #define ME_memillturn_type_name_c "MEMillTurn"
74 #define ME_memillturn_rev_type_name_c "MEMillTurnRevision"
75 #define ME_meturning_type_name_c "METurning"
76 #define ME_meturning_rev_type_name_c "METurningRevision"
77 #define ME_mewedm_type_name_c "MEWEDM"
78 #define ME_mewedm_rev_type_name_c "MEWEDM Revision"
79 
80 
81 #define ME_metrace_origin_type_name_c "Mfg0METraceOriginRel"
82 #define ME_melogical_designator_type_name_c "Mfg0MELogicalDesignatorRel"
83 
84 
93 #define ME_base_view_ref_window_name_c "viewBaseWindow"
94 
101 #define ME_activity_desc_size_c 240
102 
111 #define ME_SKIP_RELEASED_NODE 1
112 
116 #define ME_REVISE_ON_RELEASE 2
117 
121 #define ME_UPDATE_PROP_ON_SELF_ON_RELEASE 3
122 
126 #define ME_UPDATE_PROP_ON_SELF_AND_BELOW_ON_RELEASE 4
127 
129 #ifdef __cplusplus
130  extern "C"{
131 #endif
132 
145 extern ME_API int ME_init_module();
146 
147 
156 extern ME_API int MEBOM_init_module();
157 
174 extern ME_API int ME_create_process (
175  const char* id,
176  const char* revid,
177  const char* type,
178  const char* name,
179  const char* desc,
180  tag_t* newProc
181  );
190 extern ME_API int ME_create_processrevision (
191  const char* id,
192  const char* revid,
193  tag_t* newProcRev
194  );
204 extern ME_API int ME_create_operation (
205  const char* id,
206  const char* revid,
207  const char* type,
208  const char* name,
209  const char* desc,
210  tag_t* newProcOp
211  );
220 extern ME_API int ME_create_operationrevision (
221  const char* id,
222  const char* revid,
223  tag_t* newProcOpRev
224  );
234 extern ME_API int ME_create_workarea (
235  const char* id,
236  const char* revid,
237  const char* type,
238  const char* name,
239  const char* desc,
240  tag_t* newWrkarea
241  );
250 extern ME_API int ME_create_workarearevision (
251  const char* id,
252  const char* revid,
253  tag_t* newWrkAreaRev
254  );
255 
267 extern ME_API int ME_create_activity(
268  const char* name,
269  const char* type,
270  const char* desc,
271  double time,
272  tag_t* newAct
273  );
282 extern ME_API int ME_create_activity_with_list(
283  const char* name,
284  const char* type,
285  const char* desc,
286  double time,
287  int numPred,
288  const tag_t* predList,
289  tag_t* newAct
290  );
297 extern ME_API int ME_activity_add_predecessor(
298  tag_t succ,
299  tag_t pred
300  );
305 extern ME_API int ME_activity_remove_predecessor(
306  tag_t succ,
307  tag_t pred
308  );
314 extern ME_API int ME_activity_list_predecessors(
315  tag_t succ,
316  int* nPred,
317  tag_t** pred
318  );
326 extern ME_API int ME_activity_list_activities(
327  tag_t acttag,
328  int* nAct,
329  tag_t** listtags
330  );
334 extern ME_API int ME_activity_add_tool(
335  tag_t acttag,
336  const char* toolName
337  );
338 
342 extern ME_API int ME_activity_add_reference_tool(
343  tag_t acttag,
344  const char *toolName,
345  tag_t resLineTag,
346  tag_t opLineTag
347  );
351 extern ME_API int ME_activity_remove_tool(
352  tag_t acttag,
353  const char* toolName
354  );
358 extern ME_API int ME_activity_ask_toollist(
359  tag_t acttag,
360  int* nTool,
361  char*** toolList
362  );
363 
369 extern ME_API int ME_activity_list_successors(
370  tag_t predTag,
371  int* nSucc,
372  tag_t** succTags
373  );
374 
379 extern ME_API int ME_activity_list_activity_children(
380  tag_t activityTag,
381  int* nChild,
382  tag_t** actChildTags
383  );
384 
389 extern ME_API int ME_activity_list_all_children(
390  tag_t activityTag,
391  int* nChild,
392  tag_t** actChildTags
393  );
394 
400 extern ME_API int ME_activity_insert_tags(
401  tag_t parentTag,
402  int nChild,
403  const tag_t* childTags
404  );
405 
412 extern ME_API int ME_activity_ask_description(
413  tag_t activityTag,
414  char actDesc[ME_activity_desc_size_c + 1]
415  );
416 
420 extern ME_API int ME_activity_ask_description2(
421  tag_t activityTag,
422  char **actDesc
423  );
424 
431 extern ME_API int ME_activity_set_description(
432  tag_t activityTag,
433  const char new_description[ME_activity_desc_size_c + 1]
434  );
435 
439 extern ME_API int ME_activity_set_description2(
440  tag_t activityTag,
441  const char *new_description
442  );
443 
444 
448 extern ME_API int ME_Time_Analysis_Rollup(
449  tag_t node,
450  int *nValues,
451  double ** timeAnalysisValues,
452  double * tWork,
453  double * tDuration
454  );
455 
456 
460 extern ME_API int ME_Calculate_Allocated_Time(
461  tag_t node,
462  const char * calculatedBy,
463  double * allocated_time
464  );
465 
466 
467 
468 
477 extern ME_API int ME_copy_recursively(
478  tag_t WSO_to_copy,
479  tag_t configuring_BOM_window,
480  const char* copy_rules_key,
481  const char* name,
482  const char* description,
483  tag_t* new_WSO
484  );
488 extern ME_API int ME_create_process_from_template (
489  const char* id,
490  const char* revid,
491  const char* name,
492  const char* desc,
493  tag_t templateProc,
494  tag_t revisionRule,
495  tag_t bopWindow,
496  const char * cloneRuleKey,
497  tag_t* newProc
498  );
502 extern ME_API int ME_create_plant_from_template (
503  const char* id,
504  const char* revid,
505  const char* name,
506  const char* desc,
507  tag_t templatePlantRev,
508  tag_t revisionRule,
509  tag_t workingWinTag,
510  const char * cloneRuleKey,
511  tag_t* newPlant
512  );
516 extern ME_API int ME_create_product_from_template (
517  const char* id,
518  const char* revid,
519  const char* name,
520  const char* desc,
521  tag_t templateProdRev,
522  tag_t revisionRule,
523  tag_t workingWinTag,
524  const char * cloneRuleKey,
525  tag_t* newProd
526  );
527 
537 extern ME_API int ME_create_assembly_window(
538  tag_t revRule,
539  tag_t sourceBomWin,
540  tag_t* assyWindow
541  );
542 
547 extern ME_API int ME_create_attachment_window(
548  tag_t revRule,
549  tag_t sourceBomWin,
550  tag_t* attachWindow
551  );
552 
559 extern ME_API int ME_window_create_root_line(
560  tag_t win,
561  tag_t root,
562  tag_t* root_line
563  );
564 
568 extern ME_API int ME_window_set_effectivity(
569  tag_t window,
570  date_t date,
571  int unit_no,
572  tag_t end_item
573  );
574 
578 extern ME_API int ME_window_show_incremental_changes(
579  tag_t window
580  );
581 
585 extern ME_API int ME_window_hide_incremental_changes(
586  tag_t window
587  );
588 
592 extern ME_API int ME_line_ask_child_lines(
593  tag_t line,
594  int* count,
595  tag_t** child_lines
596  );
597 
601 extern ME_API int ME_line_ask_descendant_lines(
602  tag_t line,
603  int* count,
604  tag_t** desc_lines
605  );
606 
611 extern ME_API int ME_window_place_object(
612  tag_t window,
613  tag_t key,
614  tag_t* line
615  );
616 
621 extern ME_API int ME_window_place_all_instances(
622  tag_t window,
623  tag_t key,
624  int* count,
625  tag_t** lines
626  );
627 
632  tag_t assyWindow,
633  const char* ID,
634  int* count,
635  tag_t** lines
636  );
640 extern ME_API int ME_window_close(
641  tag_t window
642  );
643 
647 extern ME_API int ME_window_configure_variants(
648  tag_t win
649  );
650 
654 extern ME_API int ME_window_show_variants(
655  tag_t win
656  );
657 
661 extern ME_API int ME_window_hide_variants(
662  tag_t win
663  );
667 extern ME_API int ME_line_add_Activity_with_predecessor(
668  tag_t line,
669  tag_t object,
670  const char* rel_type,
671  tag_t* child
672  );
673 
677 extern ME_API int ME_line_add(
678  tag_t line,
679  tag_t object,
680  const char* rel_type,
681  tag_t* child
682  );
683 
687 extern ME_API int ME_line_remove(
688  tag_t parent,
689  tag_t child
690  );
691 
700 extern ME_API int ME_attachment_line_delete(
701  tag_t parent,
702  tag_t child
703  );
704 
713 extern ME_API int ME_attachment_line_change(
714  tag_t line,
715  tag_t* new_wso
716  );
717 
721 extern ME_API int ME_line_reparent(
722  tag_t child,
723  tag_t new_parent
724  );
725 
729 extern ME_API int ME_line_remove_incremental_changes(
730  tag_t line,
731  int n,
732  tag_t * ices
733  );
734 
744 extern ME_API int ME_activity_remove_res_line(
745  tag_t acttag,
746  tag_t resTag
747  );
748 
752 extern ME_API int ME_window_hide_assigned_occurrences(
753  tag_t bopWin
754  );
755 
759 extern ME_API int ME_window_show_assigned_occurrences(
760  tag_t bopWin
761  );
762 
772 extern ME_API int ME_create_bop_window(
773  tag_t* window
774  );
775 
782 extern ME_API int ME_bop_window_add_ref_window(
783  tag_t bopWindow,
784  tag_t refWindow,
785  char *winType
786  );
787 
813 extern ME_API int ME_bopwindow_add_control_occtype(
814  tag_t bopWinTag,
815  char *occType
816  );
817 
831 extern ME_API int ME_bopwindow_remove_control_occtype(
832  tag_t bopWinTag,
833  char *occType
834  );
835 
840 extern ME_API int ME_bom_window_has_ref_bop_window(
841  tag_t bomWindow,
842  int* count,
843  tag_t ** refBopWindows
844  );
848 extern ME_API int ME_close_bop_window(
849  tag_t window
850  );
854 extern ME_API int ME_create_bos_window(
855  tag_t rev_rule,
856  tag_t* window
857  );
861 extern ME_API int ME_set_bos_window_source(
862  tag_t window,
863  tag_t src_line,
864  tag_t* top_line
865  );
869 extern ME_API int ME_close_bos_window(
870  tag_t window
871  );
872 
876 extern ME_API int ME_process_balancing(
877  tag_t srcWin,
878  tag_t* srcLines,
880  int num_srcLines,
881  tag_t tarWin,
882  tag_t* tarLines,
884  int num_tarLines,
885  char* resultName,
886  char* resultDesc,
887  int options,
896  tag_t assyCtxtLineTag,
897  tag_t bomCtxtLineTag,
898  tag_t* resultView
899  );
900 
905 extern ME_API int ME_get_source_or_target_line(
906  tag_t lineTag,
907  tag_t winTag,
908  logical *isTarget,
909  tag_t *outLineTag
910  );
911 
918 extern ME_API int TCMXML_export_plmxml(
919  tag_t* selectedComps,
920  int nComps,
921  const char* applicationKey,
922  const char* fileName
923  );
924 
925 extern ME_API int TCMXML_import_plmxml(
926  const char* filePath,
927  const char* applicationType,
928  tag_t icComponent,
929  tag_t* endItem,
930  int* viewsCount,
931  tag_t** views,
932  int* errorStatus
933  );
934 
947 extern ME_API int ME_create_nx_object(
948  const char* name,
949  const char* desc,
950  const char* type,
951  const char* subType,
952  int n_int,
953  int* intList,
954  int n_double,
955  double* doubleList,
956  int n_string,
957  char** stringList,
958  char** intKeyList,
959  char** doubleKeyList,
960  char** stringKeyList,
961  tag_t* newObjTag
962  );
969 extern ME_API int ME_nx_object_read_data(
970  tag_t theTag,
971  char** resource_desc,
972  int* numIntAtts,
973  int** intAtts,
974  int* numDoubleAtts,
975  double** doubleAtts,
976  int* numStringAtts,
977  char*** stringAttrs,
978  char*** intKeyIds,
979  char*** doubleKeyIds,
980  char*** stringKeyIds
981  );
988 extern ME_API int ME_nx_object_modify_data(
989  tag_t nxObjTag,
990  const char* desc,
991  int n_int,
992  int* intList,
993  int n_double,
994  double* doubleList,
995  int n_string,
996  char** stringList,
997  char** intKeyList,
998  char** doubleKeyList,
999  char** stringKeyList
1000  );
1007 extern ME_API int MENXOBJECT_type_create(
1008  const char* meobj_class_name,
1009  const char* meobj_type_name,
1010  const char* def_class_name,
1011  int cardinality,
1012  int numOfViewAllowableTypes,
1013  tag_t* allowableViewTypes,
1014  tag_t* meobj_type_tag
1015  );
1022 extern ME_API int MENXOBJECT_type_delete(
1023  tag_t meobj_type_tag
1024  );
1025 
1038 extern ME_API int ME_genrateIPATree(
1039  tag_t bopWindow,
1040  char *ipaName,
1041  char *occGrpType,
1042  int count_selectedProcessTypes,
1043  char **selectedProcessTypes,
1044  int count_selectedConsumptionOcc,
1045  char **selectedConsumptionOcc,
1046  char *attachmentName,
1047  logical isLogFileNeeded,
1048  int count_ToReceivers,
1049  char **ToReceivers,
1050  int count_CCReceivers,
1051  char **CCReceivers,
1052  char *MailSubject,
1053  char *MailMessage,
1054  tag_t EffectivityEndItem,
1055  tag_t EffectivityEndRev,
1056  char *EffUnitRange,
1057  char *EffDateRange,
1058  tag_t *prdctWinAPR
1059  );
1066 extern ME_API int ME_updateIPATree(
1067  tag_t bopWindow
1068  );
1075 extern ME_API int ME_localupdateIPATree(
1076  tag_t bopLine
1077  );
1084 extern ME_API int ME_cleanIPATree(
1085  tag_t bopWindow,
1086  tag_t *prdctWinAPR
1087  );
1094 extern ME_API int ME_isIPAExists(
1095  tag_t bopWindow,
1096  logical *isNeeded
1097  );
1098 
1103 extern ME_API int ME_generateSearchScope(
1104  tag_t* processes, /* (I) The processes */
1105  int processes_size, /* (I) Processes size */
1106  tag_t** bomlines, /* (O) The search scope */
1107  int* bomlines_size /* (O) Search scope size */
1108  );
1109 
1116 extern ME_API int ME_saveSearchResult(
1117  tag_t process, /* (I) The process */
1118  tag_t* search_result_list, /* (I) Search result list */
1119  int search_result_size, /* (I) Search result size */
1120  char* name, /* (I) The name of the name structure */
1121  tag_t* filteredIPA, /* (O) The new structure */
1122  tag_t* filteredIPARoot, /* (O) The collection of all filteredIPA structures */
1123  tag_t** rejected_list, /* (O) The bomline that didn't get in the new structure */
1124  int* rejected_list_size /* (O) The size of rejected_list */
1125  );
1126 
1133 extern ME_API int ME_getFilteredIPA(
1134  tag_t process_line, /* (I) The process */
1135  tag_t* filterIPA /* (O) The filteredIPA */
1136  );
1137 
1141 extern ME_API int ME_deleteFilteredIPA(
1142  tag_t* process_lines, /* (I) The processes */
1143  int noOfLines /* (I) no of processes */
1144  );
1145 
1146 
1147 /*======================================================================================
1148 CICO Manager functions
1149 ======================================================================================*/
1150 
1160 extern ME_API int ME_find_checked_outs_in_structure(
1161  tag_t *lines,
1162  int lines_size,
1163  int *size,
1164  tag_t **list
1165  );
1166 
1167 /*
1168 This function checks out items for the given structures recursively
1169 */
1170 
1171 extern ME_API int ME_checkout_for_PS(
1172  tag_t TargetLine /* (I) */,
1173  logical coProcess /* (I) */,
1174  logical isRecursive /* (I) */,
1175  char *changeIdChar /* (I) */,
1176  char *commentChar /* (I) */
1177  );
1178 
1179 /*
1180 This function checks in items for the given structures recursively
1181 */
1182 
1183 extern ME_API int ME_checkin_for_PS(
1184  tag_t TargetLine /* (I) */
1185  );
1186 
1187 
1188 
1197 extern ME_API int ME_get_connected_mfgs_from_part(
1198  tag_t part,
1199  int* nMfgs,
1200  tag_t** mfgs
1201  );
1202 
1206 extern ME_API int ME_get_connected_mfgs_from_parts(
1207  tag_t* parts,
1208  int nPartCnt,
1209  tag_t** mfgs,
1210  int* nMfgCnt
1211  );
1212 
1217 extern ME_API int ME_find_node_in_context(
1218  tag_t context,
1219  tag_t node,
1220  logical byIdOnly,
1221  logical allContexts,
1222  tag_t inContextLine,
1223  tag_t** found_lines,
1224  int* found_lines_size
1225  );
1226 
1231 extern ME_API int ME_find_node_in_context_by_relation(
1232  tag_t context,
1233  tag_t node,
1234  logical byIdOnly,
1235  logical allContexts,
1236  tag_t inContextLine,
1237  const char* relationName,
1238  int relationDirection,
1239  int relationDepth,
1240  tag_t** found_lines,
1241  int* found_lines_size
1242  );
1243 
1256 extern ME_API int ME_set_bomline_prop_based_on(
1257  tag_t item_tag,
1258  tag_t revrule_tag,
1259  tag_t sc_tag,
1260  const char* closure_rule,
1261  const char* scope_id_in_context,
1262  const char* scope_id,
1263  const char* preference,
1264  logical force_update,
1265  const char* dry_run_file
1266  );
1267 
1270 typedef ME_API struct ME_saved_query_expression_s{
1272  char** entries;
1273  char** values;
1276 
1279 typedef ME_API struct ME_occurrence_note_expression_s{
1281  char** note_type_str;
1282  char** occ_qry_opr;
1289 
1293 typedef ME_API struct ME_search_expression_set_s {
1296  int num_occ_note_expressions; /* < Number of Occurrence Note Expressions */
1299 
1303 typedef ME_API struct ME_mfg_search_criteria_s {
1306 
1316 extern ME_API int ME_execute_structure_search(
1317  int num_scope_tags,
1318  const tag_t* scope_tags,
1319  const ME_search_expression_set_t* search_expression,
1320  const ME_mfg_search_criteria_t* mfg_search_criteria,
1321  int* num_bom_lines,
1322  tag_t** bom_lines
1323 );
1324 
1325 
1334 extern ME_API int ME_get_occurrence_group_views(
1335  tag_t base_view_window,
1336  int* number_of_views,
1337  tag_t** og_views
1338  );
1339 
1348 extern ME_API int ME_get_base_view(
1349  tag_t og_view,
1350  tag_t* base_view
1351  );
1352 
1364 extern ME_API int ME_create_mbom_from_ebom(
1365  tag_t ebom_root,
1366  const char* rev_rule,
1367  tag_t mbom_rev_rule,
1368  int depth,
1369  int action_on_release,
1376  const char* opaque_data,
1377  const char* log_file,
1378  tag_t* mbom_root
1379  );
1380 
1392 extern ME_API int ME_update_mbom_from_ebom(
1393  tag_t ebom_root,
1394  const char* rev_rule,
1395  tag_t ebom_scope_object,
1396  const char* ebom_idic,
1397  tag_t mbom_root,
1398  tag_t mbom_rev_rule,
1399  int depth,
1400  int action_on_release,
1407  const char* user_data,
1408  const char* log_file,
1409  tag_t* mbom_node
1410  );
1411 
1422 extern ME_API int ME_paste_duplicate_structure(
1423  const int num_src_objects,
1424  const tag_t* src_objects,
1425  const tag_t target_line,
1426  const char* copy_rules_key,
1427  int* num_new_child_lines,
1428  tag_t** new_child_lines
1429  );
1430 
1433 #ifdef __cplusplus
1434 }
1435 #endif
1436 
1437 #include <me/libme_undef.h>
1438 
1439 #endif