Main Content

Simulink.ID.getSID

(Not recommended) Get Simulink Identifier

Simulink.ID.getSID is not recommended. Use handles, paths, or objects instead of Simulink® Identifiers. For more information, see Version History.

Description

SID = Simulink.ID.getSID(object) returns the Simulink Identifier (SID) of the selected object object.

An SID is a unique and unmodifiable designation that Simulink automatically assigns.

The SID format is model_name:sid_number, where:

  • model_name is the name of the model that contains the object.

  • sid_number is a unique number within the model, assigned by Simulink.

An SID includes additional colons in certain cases, for example, on an instance of a block from a custom library.

example

Examples

collapse all

Open the model vdp.

openExample('simulink_general/VanDerPolOscillatorExample')

Get the SID of the Mu block.

SID = Simulink.ID.getSID('vdp/Mu')

Input Arguments

collapse all

Name or handle of object, specified as a character vector, string scalar, or numeric scalar.

Example: 'vdp/Mu'

Data Types: double | char | string

Output Arguments

collapse all

Simulink Identifier (SID), returned as a string scalar.

Data Types: string

Version History

Introduced in R2009b

collapse all

R2020a: Not recommended

Simulink.ID.getSID is not recommended. Use handles, paths, or objects instead of Simulink Identifiers.