|
It is also possible to control the
ACIS version for large blocks of code without having to pass an
AcisOptions parameter to each API call. This is defined in base/baseutil/version/vers.hxx
|
|
Consider the following example customer code:
|
|
|
void cust_func(void)
|
|
{
|
|
outcome oc;
|
|
|
oc = api_do_something(...);
|
|
|
if (oc.ok())
|
|
|
oc = api_do_something_else(...);
|
|
|
cust_func2(. . .);
|
|
|
}
|
|
|
To run the above logic as
ACIS 6.3, change the code as follows:
|
|
|
void cust_func(void)
|
|
{
|
|
outcome oc;
|
|
|
{
|
|
// Run everything in the following block as ACIS 6.3.
|
|
// When this code block is exited the version will revert
|
|
// to it's original setting.
|
|
ALGORITHMIC_VERSION_BLOCK(AcisVersion(6,3,0));
|
|
|
oc = api_do_something(...);
|
|
|
if (oc.ok())
|
|
|
oc = api_do_something_else(...);
|
|
|
// Even ACIS calls within cust_func2 will be run as ACIS 6.3.
|
|
cust_func2(. . .);
|
|
}
|
|
}
|
|
|
ALGORITHMIC_VERSION_BLOCK's can also be nested. When a nested version block is exited, the
ACIS version will be reverted to the version given by the next outermost version block. When all version blocks are exited, the default version is the current
ACIS version.
|