Delete a WorkAxis

Top  Previous  Next

Here's some code which I have used

 

    {

        csAxisName.Format (L"WAZR%d",iRango) ;

        CComPtr<WorkAxis> pZWorkAxis  ;

        HRESULT hRes = GetWorkAxisByName (pZWorkAxis,csAxisName,pNodesDef) ;

        if (FAILED(hRes) || (pZWorkAxis == nullptr)) {

            TRACE (L"DUR, could not get z axis to delete, R%d",iRango) ;

            return ;

        }

        pZWorkAxis->Delete(VARIANT_TRUE) ; // the parameter means "retain dependents"

    }

 

You can use the Delete function on other object types.

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)