Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

RE: [CONNECT C++] DgnElementSetTool enum ErrorNums

$
0
0

The default implementation of several DgnElementSetTool methods calls OutputErrorMessage with these enum values to output errors, for example:

bool            DgnElementSetTool::_OnInstall ()
    {
    if (SOURCE_Fence == _GetElemSource () && !FenceManager::GetManager().IsFenceActive ())
        {
        OutputErrorMessage (ERROR_NUM_NoFence);
        return false;
        }

    if (SOURCE_SelectionSet == _GetElemSource () && !SelectionSetManager::GetManager().IsActive ())
        {
        OutputErrorMessage (ERROR_NUM_NoSSElems);
        return false;
        }

    // Don't allow install if destination model is unspecified...
    return (INVALID_MODELREF != _GetDestinationModelRef ());
    }

A sub-class of DgnElementSetTool might also want to call OutputErrorMessage to output the default error message from a method it overrides. There is no significance to the actual enum values *anymore*.

HTH

-B


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>