This question is a follow up question to Exporting Summary Boxes.

When cutting away the "Head" of a summary box is there a better way than doing the following?

result = ConvolutionLayer[4, 8];

boxData = (result // ToBoxes // 
  ReplaceAll[HoldPattern[Typeset`open = _] :> (Typeset`open = True)] )  
boxData[[1, 1, 1, 1, 3]] // RawBoxes

Since just accessing the particular element seems very inelegant and might be prone to errors in the future. Ideally it would cut the + aswell.


Peering into the structure returned, you seem to want the contents of the DynamicModuleBox:

Cases[boxData, _DynamicModuleBox, Infinity];

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.