Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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" ?

Posted

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.

Posted

Thanks for help and for the great work on this site.

Posted

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 ............

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...