
! script name: solids.d/solidaxis
! 3dtopic: construct axis line of picked solid

!A
!A NAME:
!A
!A 	Solid Axis
!A
!A DESCRIPTION:
!A
!A 	This script will construct the axis line of the picked solid.
!A
!B INSTRUCTIONS:
!B
!B 	PICK SOLID: Pick the solid to have its axis line constructed.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: solid axis ")

DIM Destination$[256]
DIM Answer$[256]

ActivateUndo
Sloop:!
S1=PickEntity("PICK SOLID")
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(S1) THEN Sloop

Sline= SolidAxis(S1)

ActivateUndo
Stat= AdvanceUndoNumber("solid axis")
Stat= AddItemToUndo(WsUBCreateMode,Sline)
GOTO Sloop

Leave:!

IF NOT LEN(Destination$) THEN
	LOAD "typecontrol"
ELSE
	LOAD Destination$
END IF
END
