*WRK, Num
Sets the active workspace number.
Num
Number of the active memory workspace for APDLMath vector and matrices. All the following APDLMath vectors and matrices will belong to this memory workspace, until the next call to the *WRK command. By default, all the APDLMath objects belong to workspace number 1.
This feature enables you to associate a set of vector and matrices in a given memory workspace, so that you can easily manage the free step:
*VEC,V,D,ALLOC,5 ! V belongs to the default Workspace 1 *WRK,2 ! Set the active workspace as the number 2 *VEC,W,D,IMPORT,FULL,file.full,RHS ! W belongs to the Workspace 2 *SMAT,K,D,IMPORT,FULL,file.full,STIFF ! K belongs to the Workspace 2 *DMAT,M,ALLOC,10,10 ! M belongs to the Workspace 2 … *FREE,WRK,2 ! W, K and M are deleted, but not V *PRINT,V
This feature can be useful to free all the temporary APDLMath variables inside a MACRO in one call.