2.2.4.25 Layout


Name

Layout

Remark

The Layout class provides methods and properties common to all internal Origin layout layers. Origin layout pages contain a layout layer which contains other objects on the layout page.

An Origin C Layout object is a wrapper object that is a reference to an internal Origin layout object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object.

The Layout class is derived from the Layer and OriginObject classes from which it inherits methods and properties.

Hierarchy

Examples

EX1

void Layout_ex1()
{
    LayoutPage lp;
    lp.Create("layout.otp");
    
    if(!lp)
        return;
    Layout lo;
    // Need to explicitly cast layer to Layout
    lo = (Layout) Project.ActiveLayer();
    if( lo.IsValid() )
    {
        // List all graph objects present on the Layout page
        GraphObject grobj ;
        foreach( grobj in lo.GraphObjects )
            printf( "Found graph object: %s\n", grobj.GetName() );
    }
    else
        out_str( "Active Layer is not a Layout" );
}

Header to Include

origin.h

Reference

Members

Name Brief Example
Layout Constructor which constructs a Layout object given the name of a layout window. The object will be valid if the layout window with the given name exists. Examples