Jump to content

i want to get cg for an flat layout


Recommended Posts

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

 

image.png.6e9b53e82e3f2d64b808af866ed7c3df.png

 

 

Link to comment
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.

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