Talk:Repository.BlockSim.GetRBDBlockData/Notes: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
(published changes for 10.1.4)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}
=DRAFT=
 
 
<onlyinclude>Returns an [[RBDBlockData Class|RBDBlockData]] object that represents the characteristics of a BlockSim block.</onlyinclude>
 
== Syntax ==
'''.BlockSim.GetRBDBlockData'''(''DiagramID'', ''BlockID'')
 
===Parameters===
''DiagramID''
:Required. Integer. The numeric ID of the reliability block diagram (RBD) or fault tree.
 
''BlockID''
:Required. Integer. The numeric ID of the block.
 
 
==Example==
'''VBA'''
{{APIComment|'Connect to a Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
 
{{APIComment|'Connect to a project that contains a BlockSim diagram.}}
  MyRepository.Project.SetCurrentProject(1)
{{APIComment|'Declare an RBDBlockData object.}}
  {{APIPrefix|Dim}} ABlock {{APIPrefix|As}} RBDBlockData
{{APIComment|'Get block #1 from diagram #21 in the project.}}
  {{APIPrefix|Set}} ABlock = MyRepository.BlockSim.GetRBDBlockData(21, 1)
{{APIComment|'Display the block's properties.}}
  {{APIPrefix|Dim}} BlockID {{APIPrefix|As}} Integer
  {{APIPrefix|Dim}} BlockType {{APIPrefix|As}} BlockDataType
  {{APIPrefix|Dim}} DiagramID {{APIPrefix|As}} Integer
  {{APIPrefix|Dim}} DisplayName {{APIPrefix|As}} String
  {{APIPrefix|Dim}} URDID {{APIPrefix|As}} Integer
  BlockID = ABlock.BlockID
  BlockType = ABlock.BlockType
  DiagramID = ABlock.DiagramID
  DisplayName = ABlock.DisplayName
  URDID = ABlock.URDID
 
  MsgBox({{APIString|"Block ID: "}} & BlockID & vbNewLine & _
          {{APIString|"Block Type: "}} & BlockType & vbNewLine & _
          {{APIString|"Diagram ID: "}} & DiagramID & vbNewLine & _
          {{APIString|"Display Name: "}} & DisplayName & vbNewLine & _
          {{APIString|"URD ID: "}} & URDID)
 
'''VB.NET'''
{{APIComment|'Connect to a Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
 
{{APIComment|'Connect to a project that contains a BlockSim diagram.}}
  MyRepository.Project.SetCurrentProject(1)
{{APIComment|'Declare an RBDBlockData object.}}
  {{APIPrefix|Dim}} ABlock {{APIPrefix|As}} RBDBlockData
{{APIComment|'Get block #1 from diagram #21 in the project.}}
  ABlock = MyRepository.BlockSim.GetRBDBlockData(21, 1)
{{APIComment|'Display the block's properties.}}
  MsgBox({{APIString|"Block ID: "}} & ABlock.BlockID & vbNewLine &
          {{APIString|"Block Type: "}} & ABlock.BlockType & vbNewLine &
          {{APIString|"Diagram ID: "}} & ABlock.DiagramID & vbNewLine &
          {{APIString|"Display Name: "}} & ABlock.DisplayName & vbNewLine &
          {{APIString|"URD ID: "}} & ABlock.URDID)

Latest revision as of 23:30, 6 September 2016

DRAFT