validateGetFirstIssue

Get first issue from validation results. If no issues inside validation results or validation results is NULL it will return NULL.

Syntax

//
//   Strong typing definition
//
ValidationIssue validateGetFirstIssue(
                        ValidationResults       results
                    );


//
//   Weak typing definition
//
void    __declspec(dllexport) * __stdcall validateGetFirstIssue(
                                                                        void                    * results
                                                                    );
    

Property results

Size: 64 bit / 8 byte (reference)
???.

Example (based on pure API calls)

Here you can find code snippits that show how the API call validateGetFirstIssue can be used.

#include    "./include/ifcengine.h"
#include    <assert.h>


void    UsageExample(
            SdaiModel   model
        )
{
    //  set options if needed
    validateSetOptions(
            10,     //  limit validation processing to work for 10 seconds
            100,        //  limit validation processing to find 100 issues
            0,
            enum_validation_type::__WHERE_RULE  //  exclude where rules check
        );

    ValidationResults   results = validateModel(model);

    for (ValidationIssue issue = validateGetFirstIssue(results); issue; issue = validateGetNextIssue(issue)) {
        SdaiInstance    inst = validateGetInstance(issue);
        const char      * desc = validateGetDescription(issue);
        ... 
    }

    if (validateGetStatus(results)!=enum_validation_status::__COMPLETE_ALL) {
        printf("There may be more issues, increase limits\n");
    }

    validateFreeResults(results);
}