Jump to content

Recommended Posts

Posted

@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
Posted

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
)

 

Posted

Have you tried using the Geometric Centre Osnap?

Posted

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

Posted

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

 

 

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