Nick_101 Posted January 19, 2009 Share Posted January 19, 2009 I'm asking for help with a routine of mine, where I'm creating a region from a LWPolyline, in order to get the Centroid co-ords. However, sometimes the conversion from LWPolyline to Centroid fails, so my routine halts. . . Is it possible to check the properties of a LWPolyline to see if it can convert, or should I use vl-catch-all-apply to trap the error, and keep my routine going? In my routine I pick LWPolylines and using fields, I write the area to the centroid co-ords and create an area table with totals, all numbered etc! Change the polyline and areas and totals are updated, but it's no use with if the conversion fails!!! Anyone . . .??? Quote Link to comment Share on other sites More sharing options...
nonsmall Posted January 22, 2009 Share Posted January 22, 2009 Hello Nick_101: or you can try this code (vl-cmdf "_.Region" (car(entsel)) "") Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 22, 2009 Share Posted January 22, 2009 Did you have no luck with this? http://www.cadtutor.net/forum/showpost.php?p=205263&postcount=2 Quote Link to comment Share on other sites More sharing options...
Nick_101 Posted January 23, 2009 Author Share Posted January 23, 2009 Thanks nonsmall and Lee Mac for getting back to me . .I've been out of town (Johannesburg) for the last three days, so I'll be catching up on my routine over the weekend, but Lee Mac, the short time I had to look at what ASMI sent me, worked very well, and certainly solved the difficulty I had.....next week I'll post my 'updated' 'upgraded' routine for all to see! Ejoy the weekend! . . . .Cheers Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 23, 2009 Share Posted January 23, 2009 No Probs, Look forward to seeing the final result. Quote Link to comment Share on other sites More sharing options...
Nick_101 Posted February 6, 2009 Author Share Posted February 6, 2009 For Lee-Mac . . .nonsmall, Thanks for the comments and the encouragement. ASMI's suggestion of using the bounding box route works very well, and overcame my problem with polylines that don't convert to regions! He's my routine, which works well for me . . . .when you have 150 shops in a project and the areas are all important...say no more! I see you have a new 'image' Lee-Mac . . . nice! NTAS.lsp Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 6, 2009 Share Posted February 6, 2009 Nice one Nick, Glad you got it working in the end - if most others fail, there's a good chance that ASMI will have a solution. I see you have a new 'image' Lee-Mac . . . nice! Yes, I thought a change was in order, so just knocked something up on Photoshop Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.