• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD Map 3D

    Reply
    Contributor
    ColNew
    Posts: 11
    Registered: ‎11-13-2010
    Accepted Solution

    polygon centroid problem

    559 Views, 4 Replies
    02-22-2011 09:28 AM

    Hi all,

    I have several mpolygons, that i want to query and bring some object data as well (as text). The problem is that when the centroid of the mpolygon is outside the outline, my text inserts outside, too. Is there a way to insert them "inside" the polygon? Many thanks in advance!

    Please use plain text.
    Distinguished Mentor
    braudpat
    Posts: 578
    Registered: ‎12-15-2006

    Re: polygon centroid problem

    02-26-2011 07:50 AM in reply to: ColNew

     

    Hi from France

     

    I haven't any MAP or CIVIL avallable during WE but

    there is a special ADE command (since the first ADE module with ACAD R13/R12)

    which is called :  ADETEXTLOC   ( Automatic repeat command )

     

    So you have to use it on every MPolygon, closed Pline where the centroid seems to be outside

     

    ADETEXTLOC will create a special XDATA which is in fact the "future" LABELPOINT

    which will be used in your future query with properties alteration and text creation

    (for example: .AREA , .LENGTH , .LAYER , or any Object Data Value)

     

    Do you see what I mean ? I can't help you more without MAP/CIVIL running ...

     

    Good Luck, Patrice

     

     

     

     

    Please use plain text.
    Contributor
    ColNew
    Posts: 11
    Registered: ‎11-13-2010

    Re: polygon centroid problem

    02-26-2011 11:01 AM in reply to: braudpat

    Patrice, that worked perfectly! the only problem is that I have too many polygons that I can't handle one by one. It would be perfect for my project (and my boss : | ) if there was an automatic way of indicating the new labelpoints, I'll stick to that solution however, for now! I salute France! Greetings from bankrupt Greece!

    Colin

    Please use plain text.
    Distinguished Mentor
    braudpat
    Posts: 578
    Registered: ‎12-15-2006

    Re: polygon centroid problem

    01-24-2013 02:13 AM in reply to: ColNew

    Hello

     

    For your problem, I am working like this ...

     

    Command: MULTIPLE

    Command to repeat: ADETEXTLOC

    CLIC

    and then Next object ...

     

    <ESC> <ESC> to stop the repeated command ADETEXTLOC !

     

    Sorry I don't konow how for exmaple a Lisp/VLisp routien could be better / faster !?

     

    Bye, Patrice

     

    Please use plain text.
    *Expert Elite*
    antoniovinci
    Posts: 1,095
    Registered: ‎06-03-2011

    Re: polygon centroid problem

    02-07-2013 10:30 PM in reply to: braudpat

    I think there's no way to automatize the ADETEXTLOC process on many polygons at once, just because every closed object needs a new position clicked by hand.

    Moreover, the ADETEXTLOC command doesn't know if a centroid lies inside or outside a polygon...

    Merci beaucoup, monsieur.

    Please use plain text.