Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: help - Polyline vertex number to mtext

  1. #1
    Member
    Join Date
    2023-01
    Posts
    8
    Login to Give a bone
    0

    Default help - Polyline vertex number to mtext

    Hi, I need some help. I am searching for a lisp to :

    1) select a close polyline.
    2) Pick the first point
    3) insert all point numbers to mtext like the *dwg
    4) Give an option to insert text in [model space or paper space]. For model space ask the text height , for paper scase the text height 2.5



    Thanks
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    2023-01
    Posts
    8
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    Any idea?

    Thanks

  3. #3
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    The vertices are contained in the LWPolyline.Coordinates collection. The index number of the coordinate is the vertice number. You can get the coordinate number (which the help topic note is in the entity's OCS) and transform that to UCS to use that to place a text object. The topic I linked to has a lisp sample. You could also use the coordinates to create a region and get it's Area property.
    C:> ED WORKING....

  4. #4
    Member
    Join Date
    2023-01
    Posts
    8
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    Hi Ed Jobe. The names of the vertex include in attribute block. Like the *.dwg.

  5. #5
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    Yes, you can add a block instead of a text object. I just gave you some ideas. I'm sorry, but I don't have time to write it for you.
    C:> ED WORKING....

  6. #6
    Member
    Join Date
    2023-01
    Posts
    8
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    Can anyone help with the code because I don't know how to do it?

    Thanks

  7. #7
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    That's how I got started programming 30 years ago.
    C:> ED WORKING....

  8. #8
    Member
    Join Date
    2023-01
    Posts
    8
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    Hi Ed Jobe. Can you Help

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    I'm sorry, not at the moment. I have a priority project to complete. Maybe next week.

    BTW, in the dwg you posted, there may not be 2 closed plines. It could be represented by a closed one with another open one having 2 vertices in common with the other one.
    Last edited by Ed Jobe; 2023-01-11 at 06:50 PM.
    C:> ED WORKING....

  10. #10
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: help - Polyline vertex number to mtext

    As a substitute, I wrote this program for someone else a long time ago. It places sequential text at your pick points.
    Attached Files Attached Files
    C:> ED WORKING....

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 2017-05-01, 11:00 AM
  2. Vertex X and Vertex Y for Leader
    By ismail.asi.160407 in forum AutoCAD Fields
    Replies: 4
    Last Post: 2010-05-17, 09:36 AM
  3. Adding vertex to polyline
    By georgen in forum AutoCAD General
    Replies: 3
    Last Post: 2008-12-12, 03:13 PM
  4. Adding a vertex to a polyline
    By cadconcepts in forum AutoLISP
    Replies: 1
    Last Post: 2007-11-06, 11:13 PM
  5. Polyline add/remove vertex right click options
    By steve.howatt in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2004-08-24, 02:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •