Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a problem with some regions, when getting the centroid, function crashes, and if I go to the object properties, centroid said Automation Error. Region is not on the UCS plane
I tried setting the UCS to region object, before accessing centroid property, but crashes the same
It happens in many dxf files when creating region from original polyline, but in many others works perfectly
(setq en (car(entsel)))
(setq obj1 (vlax-ename->vla-object en))
(setq pc (vla-get-centroid obj1));
;;;;here crashes and can not control with error trap in order to know before getting centroid and continue
(vlax-release-object obj1)
If somebody knows how to solvethis. thanks
Solved! Go to Solution.