cStorySetStories Method

Sets the stories for the current tower

Namespace:  ETABS2016
Assembly:  ETABS2016 (in ETABS2016.dll) Version: 16.0.0.0 (16.0.0.0)
Syntax
int SetStories(
	string[] StoryNames,
	double[] StoryElevations,
	double[] StoryHeights,
	bool[] IsMasterStory,
	string[] SimilarToStory,
	bool[] SpliceAbove,
	double[] SpliceHeight
)

Parameters

StoryNames
Type: SystemString
The names of the stories
StoryElevations
Type: SystemDouble
The story elevations. This array has length (Number of stories + 1). The first value in the array is the "Base" elevation, commonly 0.
StoryHeights
Type: SystemDouble
The story heights. Although this argument is not optional, an empty array may be used, and the heights will be inferred from the StoryElevations array. This array has length (Number of stories), with no value for "Base"
IsMasterStory
Type: SystemBoolean
Whether the story is a master story. This array has length (Number of stories), with no value for "Base"
SimilarToStory
Type: SystemString
If the story is not a master story, which master story the story is similar to. This array has length (Number of stories), with no value for "Base"
SpliceAbove
Type: SystemBoolean
This is True if the story has a splice height, and False otherwise. This array has length (Number of stories), with no value for "Base"
SpliceHeight
Type: SystemDouble
The story splice heights, if applicable. This array has length (Number of stories), with no value for "Base"

Return Value

Type: Int32
Returns zero if the story data is successfully set, otherwise returns nonzero.
Remarks
To change the current tower, use SetActiveTower(String)
Examples
VB
Public Sub Example()
       Dim SapModel As cSapModel
       Dim EtabsObject As cOAPI
       Dim ret As Integer = -1
       Dim NumberStories As Integer
       Dim StoryNames() As String
       Dim StoryHeights() As Double
       Dim StoryElevations() As Double
       Dim IsMasterStory() As Boolean
       Dim SimilarToStory() As String
       Dim SpliceAbove() As Boolean
       Dim SpliceHeight() As Double

   'create ETABS object
       EtabsObject = CreateObject("CSI.ETABS.API.ETABSObject")

   'start ETABS application
       ret = EtabsObject.ApplicationStart()

   'create SapModel object
       SapModel = EtabsObject.SapModel

   'initialize model
       ret = SapModel.InitializeNewModel()

   'create steel deck template model
       ret = SapModel.File.NewSteelDeck(4,12,12,4,4,24,24)

   'set stories
       Dim inStoryNames As String() = {"MyStory1", "MyStory2", "MyStory3", "MyStory4", "MyStory5", "MyStory6"}
       Dim inStoryElevations As Double() = {0, 5, 15, 23, 23.5, 40, 50}
       Dim inStoryHeights As Double() = {2, 5, 7, 33, 1, 9}
       Dim inIsMasterStory As Boolean() = {False, False, False, False, False, True}
       Dim inSimilarToStory As String() = {"None", "", "MyStory6", "MyStory6", "MyStory6", "MyStory6"}
       Dim inSpliceAbove As Boolean() = {False, True, False, True, False, True}
       Dim inSpliceHeight As Double() = {0, 0, 2, 2, 0, 1}

       ret = SapModel.Story.SetStories(inStoryNames, inStoryElevations, inStoryHeights, _
                                   inIsMasterStory, inSimilarToStory, inSpliceAbove, inSpliceHeight)

   'get stories
       ret = SapModel.Story.GetStories(NumberStories, StoryNames, StoryHeights, StoryElevations, _
                                   IsMasterStory, SimilarToStory, SpliceAbove, SpliceHeight)

   'close ETABS
       EtabsObject.ApplicationExit(False)

   'clean up variables
       SapModel = Nothing
       EtabsObject = Nothing
   End Sub
See Also