!   TITLE:  create_area.mac (SM_TOOL)
!
!
!   OBJECTIVE:
!
!   This sub-macro creates areas from newly created keypoints.
!
!
!   COMMAND SYNTAX:
!
!           CREATE_AREA, c_acs
!
!
!   ARGUMENTS:
!
!       (1) c_acs = boolean operator to create lines in active coordinate
!                   system:
!
!               0 (or blank) = creates straight lines between KP's,
!                              regardless of active c.s.
!
!               1 = creates lines in active c.s.
!
!
!   DESCRIPTION:
!
!   This macro uses the macro command CREATE_LINES.  From these keypoints
!   the lines are first created, then the area from the lines. Therefore,
!   this macro serves as a replacement step for the series of steps in creating
!   lines and then creating areas.  The argument used here is the same as
!   CREATE_LINES, and its values is transferred directly to CREATE_LINES.
!
!
!
*get,prkey_,active,0,prkey
/nopr
!
c_acs=arg1
!
create_lines,c_acs,0,1
!
*if,newkps_,ge,2,then
    ksel,s,kp,,km-(newkps_-1),km
    lslk,s,1
    al,all
*endif
!
init_entity_num
!
lplot
!
*set,newkps_,
*set,c_acs,
!
*if,prkey_,eq,1,then
    /go
*endif