!   TITLE:  create_volume.mac (SM_TOOL)
!
!
!   OBJECTIVE:
!
!   This sub-macro creates a volume from a newly created set of keypoints.
!
!
!   COMMAND SYNTAX:
!
!                       (1)    (2)
!       CREATE_VOLUME, c_acs, d_ext
!
!
!   ARGUMENTS:
!
!       (1) c_acs = boolean operator to create lines in the active
!                   coordinate system:
!
!               0 (or blank) = creates straight lines between KP's,
!                              regardless of active c.s.
!
!               1 = creates lines in active c.s.
!
!       (2) d_ext = extrusion distance of area that forms the new volume.
!
!
!   DESCRIPTION:
!
!   The keypoints are connected by lines which will bound a newly formed
!   area. This is achieved by using the macro command CREATE_AREA, and
!   extruding a given distance, D_EXT.  The arguments used here are the same
!   as in CREATE_LINES, except for SEQNCE which is not used since the lines
!   must form a closed loop in order to create an area. Therefore, option
!   zero (0 or blank) is always specified in CREATE_LINES, which is called
!   in CREATE_AREA. The value of C_ACS is transferred directly to
!   CREATE_LINES, along with the 0 value of SEQNCE. The argument D_EXT is
!   transferred to the ANSYS command VOFFST. (See CREATE_LINES for the options
!   on the C_ACS argument)
!
!   In the case that it is desired to retain the base area that is created and
!   extruded to form the new volume, this area number is stored in the parameter
!   A_BASE, and returned to the main part macro for use in future operations, if
!   desired.
!
!
!
*get,prkey_,active,0,prkey
/nopr
!
_cacs=arg1
_dext=arg2
!
create_area,_cacs
!
a_base=am
voffst,am,_dext
!
init_entity_num
!
vplot
!
*set,_dext,
*set,_cacs,
!
*if,prkey_,eq,1,then
    /go
*endif