Jump to content

i want to get cg for an flat layout

Recommended Posts


@Gi7 The more information you provide, the more likely you are to get a good response to your question. I'm not sure there is enough information in your opening post.

  • Like 2
Link to post
Share on other sites

It looks like the Massprop report, ok very simple, a option is write to file so you do that and then read the file and get the centroid, do via a lisp.


2nd try this (setq pt (osnap (getpoint "\nselect pline ") "gcen")). You will have to have polylines for it to work so need Bpoly as well. 


(while (setq pt (getpoint "\nPick inside area Enter to exit"))
(command "bpoly" pt "")
(setq obj (vlax-ename->vla-object (entlast)))
(setq cpt (osnap (vlax-curve-getStartPoint obj) "gcen"))
(command "erase" (entlast) "")
(princ cpt) ; do your thing


Link to post
Share on other sites

i have used mass prop and other but it looks like the cg is little far from actual

Link to post
Share on other sites

I checked mass prop compared to gcen and they were the same if you want a overall for the shapes in the dwg you need a outer pline. Did find do a UCS W 1st.





Link to post
Share on other sites

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.

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