User:Kate Racaza/APIdraftspage: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
=TOC=
=TOC=
<div style="border:1px solid #AAA; background:#f9f9f9; border-radius:10px; width:auto; margin:0 0 1em 1em; padding:1em;">
<div style="border:1px solid #AAA; background:#f9f9f9; border-radius:10px; width:auto; margin:0 0 1em 1em; padding:1em;">
Line 6: Line 7:
*[[ResourceFilterEnum_Enumeration]]
*[[ResourceFilterEnum_Enumeration]]


'''Methods'''
'''New Methods'''
*[[Repository.Model.GetAllModels]]- SYN-I-4788
*[[Repository.Xfmea.GetItemInSystemHierarchy_Method]]


'''Edits to Existing Methods'''
*SYN-I-4788 (non code-breaking)
:*[[Repository.Model.GetAllModels]]
:*[[Repository.Model.GetAllModelsInfo]]
:*[[Repository.Action.GetAllActions]]
:*[[Repository.Action.GetAllActionsDictionary]]
:*[[Repository.Crew.GetAllCrews]]
:*[[Repository.Pool.GetAllPools]]
:*[[Repository.Task.GetAllScheduledTasks]]
:*[[Repository.Task.GetAllCorrectiveTasks]]
:*[[Repository.URD.GetAllURDs]]
:*[[Repository.Variable.GetAllVariables]]
:*[[Repository.Control.GetAllXfmeaControls]]
:*[[Repository.Control.GetAllXfmeaControlsDictionary]]
</div>
</div>






=[[Repository.Model.GetAllModels]]=
=SYN-I-4788=
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}
Use this template:


 
Gets a <span style="color:#FF0000">list of models </span>associated with a project. Returns a '''[[CModel Class|cModel]]''' object array that contains <span style="color:#FF0000">the models </span>in that project.</onlyinclude>  
<onlyinclude>Gets a list of models associated with a project. Returns a '''[[CModel Class|cModel]]''' object array that contains the models in that project.</onlyinclude>  


== Syntax ==
== Syntax ==
  '''.Model.GetAllModels'''(''Filter'')
  '''.Model.GetAllModels'''<span style="color:#FF0000">(''Filter'')</span>
 
===Parameter===
''Filter''
:Optional. A filter that returns a particular type of model resource (e.g., global models only, local and global models only, etc.). Can be any [[ResourceFilterEnum_Enumeration|ResourceFilterEnum]] constant. Default value = 0, which returns local models only.


===Parameters===
<span style="color:#FF0000">''Filter''</span>
:Optional. A filter that returns a particular type of <span style="color:#FF0000">model</span> resource (e.g., global only, local and global only, etc.). Can be any [[ResourceFilterEnum_Enumeration|ResourceFilterEnum]] constant. Default value = 0, which returns local <span style="color:#FF0000">models</span> only.


== Example ==
== Example ==
This example assumes that models exist in the first available project of a repository.
Edit the comment:


'''VBA|VB.NET'''
'Get a list of all <span style="color: #FF0000">local models </span> in project #1.
{{APIComment|'Add code to connect to a Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  {{APIComment|...}}
 
{{APIComment|'Get a list of all local models in project #1.}}
  {{APIPrefix|Dim}} ListofModels() {{APIPrefix|As}} cModel
  MyRepository.Project.SetCurrentProject (1) 
  ListofModels = MyRepository.Model.GetAllModels()
{{APIComment|'Output sample: Display the number of elements in the array.}}
  {{APIPrefix|Dim}} NumberofElements {{APIPrefix|As}} Integer
  NumberofElements = UBound(ListofModels) - LBound(ListofModels) + 1
  MsgBox (NumberofElements)

Revision as of 18:26, 4 November 2015

TOC

New Classes

New Enums

New Methods

Edits to Existing Methods

  • SYN-I-4788 (non code-breaking)


SYN-I-4788

Use this template:

Gets a list of models associated with a project. Returns a cModel object array that contains the models in that project.

Syntax

.Model.GetAllModels(Filter)

Parameters

Filter

Optional. A filter that returns a particular type of model resource (e.g., global only, local and global only, etc.). Can be any ResourceFilterEnum constant. Default value = 0, which returns local models only.

Example

Edit the comment:

'Get a list of all local models in project #1.