pterosaurus Posted March 14, 2010 Posted March 14, 2010 Hello everybody, Two questions about MASSPROP: 1. I would like to be able to set a point at the centroid of a region (for example to then translate the UCS to this very point). Copy-Paste from the output window doesn't satisfy me for I'll loose precision due to round-off error. Would it be possible to set a variable with any of the results of this command. 2. What is this strange .mpr extension ? Is it intended for use with other softs ? Regards. Quote
CarlB Posted March 15, 2010 Posted March 15, 2010 AFAIK, no way to get results of MASSPROP other than by copying from text window or the output file. Set units precision to 8 before running, should give you 8 decimal places, should be close enough for all practical purposes. There are vlisp functions to obtain a centroid from a region, I believe this has been discussed in customization forum. mpr is just an extension to distinguish from other files; it's a simple text/ASCII file. "mpr" from MassPRoperty Quote
MSasu Posted March 15, 2010 Posted March 15, 2010 This thread could be a starting point: http://www.cadtutor.net/forum/showthread.php?t=37358 Regards, Quote
pterosaurus Posted March 15, 2010 Author Posted March 15, 2010 Ok, thanks for replies. I actually thought of a procedure parsing the mpr file to extract the values, the inconvenient is I'd have to modify the units precision temporarily in case it isn't high enough before generating the text file and then setting it back to its initial value. Ok, not such a big deal, but my question was, is there any way to catch the values calculated by massprop. Not quite easy I guess since massprop is not a purely functional procedure but has the side effect of printing those values. Should I move this topic to "CUSTOMIZATION" ? Quote
fuccaro Posted March 15, 2010 Posted March 15, 2010 You can not move yet this topic. Maybe later, when you will be a moderator in this forum... I moved it for you, let's hope you will get answers soon. Quote
pterosaurus Posted March 15, 2010 Author Posted March 15, 2010 Thanks for help and for the great work on this site. Quote
pterosaurus Posted March 15, 2010 Author Posted March 15, 2010 In other words: I'd like to write a purely functional version of massprop (no side effects). That would allow to integrate such a function in say a function that draws the deflected shape of a beam. Locating the centroid is also useful when lifting an arch for example. I know there already exist tons of beautiful programs to do that (Robot is one), but I think that is quite an interesting exercise, useful if you do not want to leave AutoCAD, and connecting the drafting powers of AutoCAD to computational routines just makes me dream ! Work in progress ............ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.