
! script name: vcontrol.d/showdpndncy
! var_topic: show variational dependency

!A
!A NAME:
!A
!A	Show Dependency
!A
!A DESCRIPTION:
!A
!A	This script shows the elements which are dependent on a given
!A	element. The generation of dependencies is defaulted at 5.
!A	This means that the programs looks for elements which are
!A	dependent on dependent elements to a stack of 5 levels.
!A
!B INSTRUCTIONS:
!B
!B	PICK ENTITY: Pick the entity to show dependency.
!B
!# see also - htdocs/help.d/vdminfo.htm

Stat=ChangeLabelStr("ScriptNameStatus","Function: show dependency")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM Descr$[256]

Generation=5
Dependency_color=3
Highlight_color=2

Start:!
Pick_ent:!
Stat=SetInputFormat("n4","")
E1=PickEntity("PICK ENTITY")
IF ExitScript(Destination$) THEN Leave
IF NOT ValidGeometry(E1) THEN Pick_ent

Stat=ReadEntityName(E1,Name$)
Stat=ShowDependency(Name$,Generation,Dependency_color)
Stat=PlotEntity(E1,Highlight_color)

GOTO Pick_ent

Leave:!
Stat=SetInputFormat("n4","")
IF NOT LEN(Destination$) THEN
	LOAD "typecontrol"
ELSE
	LOAD Destination$
END IF
END
