OriginObject::IsValid

Description

Checks the validity of this Origin object.

Syntax

BOOL IsValid( )

Parameters

Return

Returns FALSE if an Origin Object is not valid and returns TRUE otherwise.

Examples

EX1

// Find first page in project (if any exist)
// Check validity of the PageBase object, then detach and check again
int OriginObject_IsValid_ex1()
{
    PageBase pb = Project.Pages(0); // Get active PageBase
    if( pb.IsValid() )
        printf("Page is Valid!\n");
    if( pb ) // This notation is functionbally equivalent to pb.IsValid()
        printf("Page is Valid!\n");
    pb.Detach();
    if( !pb.IsValid() )
        printf("Page is NOT Valid!\n");
    return 0;
}

Remark

Checks the validity of this Origin object (i.e. whether or not the Origin C object is successfully

attached to the Origin object). The validity of all Origin objects should be verified before usage.

Using an invalid Origin object will cause an Origin C run time error.

See Also

OriginObject::Invalidate

header to Include

origin.h