Main Content

close

    Description

    close(profile,force) closes the profile and deletes it from the workspace. If there are any unsaved changes, you will receive an error unless the argument force is set to true.

    Tip

    Use closeAll to force close all loaded profiles.

    example

    Examples

    collapse all

    Create a profile for latency characteristics and save it.

    profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");
    
    latencybase = profile.addStereotype("LatencyBase");
    latencybase.addProperty("latency",Type="double");
    latencybase.addProperty("dataRate",Type="double",DefaultValue="10");
    
    connLatency = profile.addStereotype("ConnectorLatency",...
    Parent="LatencyProfile.LatencyBase");
    connLatency.addProperty("secure",Type="boolean");
    connLatency.addProperty("linkDistance",Type="double");
    
    nodeLatency = profile.addStereotype("NodeLatency",...
    Parent="LatencyProfile.LatencyBase");
    nodeLatency.addProperty("resources",Type="double",DefaultValue="1");
    
    portLatency = profile.addStereotype("PortLatency",...
    Parent="LatencyProfile.LatencyBase");
    portLatency.addProperty("queueDepth",Type="double");
    portLatency.addProperty("dummy",Type="int32");
    
    profile.save

    Force close profile and attempt to inspect it.

    profile.close(true)
    profile
     profile = 
    
      handle to deleted Profile

    Input Arguments

    collapse all

    Profile, specified as a systemcomposer.profile.Profile object.

    Whether to force close profile, specified as 1 (true) to close the profile without saving or 0 (false). to be prompted to save the profile before closing.

    Data Types: logical

    More About

    collapse all

    Version History

    Introduced in R2019a