VMASK

!First select nodes of interest after solving a problem

*get,NNUMMAX,node,,num,max 			! Get max node number 
*del,NMASK 							! Delete NMASK array, if it exists 
*del,NARRAY 						! Delete NARRAY array, if it exists 
*dim,NMASK,array,NNUMMAX 			! Define NMASK array 
*dim,NARRAY,array,NNUMMAX,4 		! Define NARRAY array to hold results 
*vget,NMASK(1),node,1,nsel 			! Get status of selected nodes 
									! 1 = selected 
									! 0 = undefined, -1 = unselected 
*vmask,NMASK(1) 					! Use NMASK as masking array 
									! if NMASK(i) > 0.0, perform operation "i" 
									! if NMASK(i) < 0.0, do not perform on "i" 
*vget,NARRAY(1,1),node,1,u,x 		! Get UX for nodes only if selected 
*vmask,NMASK(1) 					! Reactivate masking for next operation 
									! *VMASK only works per command 
*vget,NARRAY(1,2),node,2,u,y 		! GET UY for nodes only if selected 
*vmask,NMASK(1) 
*vget,NARRAY(1,3),node,3,u,z 		! GET UZ for nodes only if selected 
*vfill,NARRAY(1,4),ramp,1,1 		! Fill vector from 1 to NNUMMAX (node no.)


*cfopen,vmask,txt 					! Open file called "vmask.txt" 
*vwrite 							! Write header information 
('NODE',10x,'UX',10x,'UY',10x,'UZ')
*vmask,NMASK(1) 					! Use mask, then write only selected nodes
*vwrite,NARRAY(1,4),NARRAY(1,1),NARRAY(1,2),NARRAY(1,3) 
(F10.0,tl1,' ',F10.6,' ',F10.6,' ',F10.6) 
*cfclos 							! Close "vmask.txt" file