Command: _Box
First corner of base ( Diagonal 3Point Vertical Center ): 0,0,0
Other corner of base or length ( 3Point ):
Height. Press Enter to use width:
1 extrusion added to selection.
Command: Volume
Calculating volume… Press Esc to cancel
Volume = 41787.7356 (+/- 1e-05) cubic inches
I need to write the volume in the sample above to an external text file and then close the file. The file will be read later by a C++ program. If it’s easier to just write the whole line that’s fine, the volume can be stripped out in C++.
I use C++ to generate Rhino command scripts. The idea is to get the volume from a single object my program has already selected and put it where the C code can see it. The simple-minded way seemed to be write it into a file in Rhino and open that later in C.