TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

How to calculate Area and Volume of a graphic object programmatically
Read 2033 times
* November 22, 2011, 09:23:37 PM
I need to caluculate surface area and volume of added graphic object (E.g. a 3D BOX).
Can anyone help me for this, how to get these values programmatically.

I tried M_Phisics and other M_ extended properties of graphic. But they have NULL value. However when I manually use Selection Info palette and click on "Show Item Physical Metrics" button. It does calculate Area, Volumne etc.

I want to do these calculations via my program.

Anyone has any idea....

Thanks in advance.

Logged


* November 26, 2011, 04:58:11 AM
#1
Hi dnsin
I checked the itemproperties with vb6 . No volume listed there.
I would do a workaround.
I have good experiences with autoIT. There I have reliable access to the window objects.
In autoIT do the same as manually and then read the information from the mesurementinfo-window.
AutoIT is easy to use and its free.

best regards
Bernd


Logged


* November 26, 2011, 07:54:16 AM
#2
I wrote a code in autoIT to bring the mesurement info to clipboard
e.g.  Volume = 129,2474 Cubic m

attached autoIT-code and .exe

best regards
Bernd

Logged


* November 27, 2011, 06:37:53 PM
#3
Hi ibruethsch
Thanks for your help, I'll try AutoIt.
Regards

Logged