GetNameInPropFile

GetNameInPropFile

Syntax

SapObject.SapModel.PropFrame.GetNameInPropFile

VB6 Procedure

Function GetNameInPropFile(ByVal Name As String, ByRef NameInFile As String, ByRef FileName As String, ByRef MatProp As String, ByRef PropType As eFramePropType) As Long

Parameters

Name

The name of an existing frame section property.

NameInFile

The name of the specified frame section property in the frame section property file.

FileName

The name of the frame section property file from which the specified frame section property was obtained.

MatProp

The name of the material property for the section.

PropType

This is one of the following items in the eFramePropType enumeration.

SECTION_I = 1

SECTION_CHANNEL = 2

SECTION_T = 3

SECTION_ANGLE = 4

SECTION_DBLANGLE = 5

SECTION_BOX = 6

SECTION_PIPE = 7

SECTION_RECTANGULAR = 8

SECTION_CIRCLE = 9

SECTION_GENERAL = 10

SECTION_DBCHANNEL = 11

SECTION_AUTO = 12

SECTION_SD = 13

SECTION_VARIABLE = 14

SECTION_JOIST = 15

SECTION_BRIDGE = 16

SECTION_COLD_C = 17

SECTION_COLD_2C = 18

SECTION_COLD_Z = 19

SECTION_COLD_L = 20

SECTION_COLD_2L = 21

SECTION_COLD_HAT = 22

SECTION_BUILTUP_I_COVERPLATE = 23

SECTION_PCC_GIRDER_I = 24

SECTION_PCC_GIRDER_U = 25

Remarks

This function retrieves the names of the section property file from which an imported frame section originated, and it also retrieves the section name used in the property file.

The function returns zero if the names are successfully retrieved; otherwise it returns nonzero.

If the specified frame section property was not imported, blank strings are returned for NameInFile and FileName.

VBA Example

Sub GetFramePropNameInFile()

'dimension variables

Dim SapObject as cOAPI

Dim SapModel As cSapModel

Dim ret As Long

Dim NameInFile As String

Dim FileName As String

Dim MatProp As String

Dim PropType As eFramePropType

'create Sap2000 object

Set SapObject = CreateObject("CSI.SAP2000.API.SapObject")

'start Sap2000 application

SapObject.ApplicationStart

'create SapModel object

Set SapModel = SapObject.SapModel

'initialize model

ret = SapModel.InitializeNewModel

'create model from template

ret = SapModel.File.New2DFrame(PortalFrame, 2, 144, 2, 288)

'import new frame section property

ret = SapModel.PropFrame.ImportProp("MyFrame", "A992Fy50", "Sections8.pro", "W18X35")

'get frame property name in file

ret = SapModel.PropFrame.GetNameInPropFile("MyFrame", NameInFile, FileName, MatProp, PropType)

'close Sap2000

SapObject.ApplicationExit False

Set SapModel = Nothing

Set SapObject = Nothing

End Sub

Release Notes

Initial release in version 11.03.

See Also