!******************************************************************************* ! ! UCMFE.MAC ! --------- ! ! Description ! ----------- ! This macro searches the database for individual parts and assigns them to ! named components based on their constituent FE entities. ! ! Revision History ! ---------------- ! 16/11/04 LC Initial release. ! 23/11/04 LC Added CMPLOT to end of macro. ! ! Usage ! ----- ! Invoke the macro by typing the command: ! ! UCMFE,IELEM,INODE ! ! where: IELEM=1 if element components are to be created. ! INODE=1 if node components are to be created. ! ! The default is to create both types of component. ! ! Output ! ------ ! The macro creates components with the following naming convention: ! ! Cn_X ! ! where: n is the part number. ! X is "E" to indicate an element component, ! "N" to indicate a node component, ! !******************************************************************************* *if,arg1,eq,0,and,arg2,eq,0,then arg1=1 arg2=1 *endif allsel *get,nonodes_,node,,count *if,nonodes_,gt,0,then more_nodes_=1 i_=0 *dowhile,more_nodes_ /gopr i_=i_+1 *get,nodemin_,node,,num,min nsel,s,,,nodemin_ nonodes_=1 continue_=1 *dowhile,continue_ /gopr esln *get,noelems_,elem,,count *if,noelems_,ne,0,then nsle *endif *get,nonodes_new_,node,,count *if,nonodes_new_,eq,nonodes_,then continue_=0 *else nonodes_=nonodes_new_ *endif *enddo cm,c%i_%_n,node *get,noelems_,elem,,count *if,noelems_,gt,0,then cm,c%i_%_e,elem *endif allsel *do,j_,1,i_,1 cmsel,u,c%j_%_n *enddo *get,numnode_,node,,count *if,numnode_,eq,0,then more_nodes_=0 *endif *enddo cmsel,all allsel *do,j_,1,i_,1 *if,arg1,ne,1,then cmdele,c%j_%_e *endif *if,arg2,ne,1,then cmdele,c%j_%_n *endif *enddo cmplot *else *msg,error No FE model exists. *endif *del,,prm_