Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 1.39 KB

File metadata and controls

64 lines (50 loc) · 1.39 KB

GetLayerForStory

Description

Gets the layer with the story and layer level type specified.

FUNCTION GetLayerForStory(
				story     : HANDLE;
				levelType : STRING): HANDLE;
def vs.GetLayerForStory(story, levelType):
    return HANDLE

Parameters

Name Type Description
story HANDLE The Story for which the will be looked up for level types.
levelType STRING The level type of the story, which associated layer will be returned.

Examples

VAR

layer:HANDLE;

BEGIN

layer:=GetLayerForStory(story);
{ Is there a current level type being used }
if ( storyLevel <> '' ) THEN BEGIN
	{ Find a layer with this type for the story }
	if ( hStory <> NIL ) THEN BEGIN
		layerH := GetLayerForStory( hStory, storyLevel );
import vs

# Gets the layer with the story and layer level type specified.
story = vs.FSActLayer()  # handle to the first selected object on the active layer
levelType = 'Example'

objHandle = vs.GetLayerForStory(story, levelType)
if objHandle is not None:
    vs.Message('Created object handle: ' + str(objHandle))

See Also

VS Functions: GetStoryOfLayer | GetNumStories | CreateStory | AssociateLayerWithStory

Version

Availability: from Vectorworks 2012

Category