Jump to content

LWPolyline to Region.....Sometimes if fails!


Nick_101

Recommended Posts

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

Link to comment
Share on other sites

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 :D

Link to comment
Share on other sites

  • 2 weeks later...

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!8)

NTAS.lsp

Link to comment
Share on other sites

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

I see you have a new 'image' Lee-Mac . . . nice!8)

 

Yes, I thought a change was in order, so just knocked something up on Photoshop 8)

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