Dimensions in a drawing sheet

Top  Previous  Next

Here's how to count the number of dimensions in a drawings sheet:

 

   CComPtr<DrawingViews> pViews = nullptr ;

   hRes = pSheet->get_DrawingViews (&pViews) ;

 

   {

       CComPtr<DrawingDimensions> pDimensions = nullptr ;

       hRes = pSheet->get_DrawingDimensions (&pDimensions) ;

       if (FAILED(hRes)) {

           ShowCOMError (hRes,L"pSheet->get_DrawingDimensions failed ");

       }

 

       long lNumDims;

       hRes = pDimensions->get_Count(&lNumDims);

       if (FAILED(hRes)) {

           ShowCOMError (hRes,L"pDimensions->get_Count failed ");

       }

 

       WalertBoxA ("This has %d dimensions",lNumDims) ;

   }

 

See also retrievable dimensions.

 

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