HMIN_sethmxpath()

Sets the directory where the HMX file is created.

Syntax

void HMIN_sethmxpath(char *path);

Type

HyperMesh hminlib Function

Description

Sets the directory where the HMX file is created. If the specified location does not have write permission, the file is created in the current working directory.

This is utilized in model readers that use HMX files.

Inputs

path
The directory where the file should be created. Must use forward slashes for the directory separator.

Example

To set the HMX path to the same directory as the input model (passed as an argument to the model reader):

char pathToFile[256];
pathToFile[0] = 0;
for (int i = strlen(argv[1]) - 1; i > 0; i--)
{
    if (argv[1][i] == '/' || argv[1][i] == '\\')
    {
        strncpy(pathToFile, argv[1], i + 1);
        pathToFile[i + 1] = 0;
        break;
    }
}
HMIN_sethmxpath (pathToFile);

Errors

None.

Version History

12.0