Jump to content

Insert a point at each vertex of selected polys


gilsoto13

Recommended Posts

Legend!

Thanks very much. Does this work muiltply, i.e select all circles, rather than select one at a time?

Thanks so much.

 

Just checked it all - works fantastic. Great. Thanks so much.

Link to comment
Share on other sites

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    10

  • gilsoto13

    6

  • LEIGH

    3

  • Lee Mac

    3

Alternatively, this program will retain the circle properties (layer/lineweight/linetype etc.) and also account for circles which lie in a plane other than the WCS plane (since Points are defined relative to the WCS and the center of a Circle entity is defined relative to the OCS of the Circle).

 

Code is more verbose than necessary since I avoided the use of Visual LISP.

([color=BLUE]defun[/color] c:Cir2Pt ( [color=BLUE]/[/color] el en i ss )
 ([color=BLUE]if[/color] ([color=BLUE]setq[/color] i -1 ss ([color=BLUE]ssget[/color] [color=MAROON]"_:L"[/color] '((0 . [color=MAROON]"CIRCLE"[/color]))))
   ([color=BLUE]while[/color] ([color=BLUE]setq[/color] en ([color=BLUE]ssname[/color] ss ([color=BLUE]setq[/color] i ([color=BLUE]1+[/color] i)))) 
     ([color=BLUE]if[/color]
       ([color=BLUE]entmakex[/color]
         ([color=BLUE]apply[/color] '[color=BLUE]append[/color]
           ([color=BLUE]subst[/color] [color=BLUE]nil[/color] ([color=BLUE]list[/color] ([color=BLUE]assoc[/color] 40 ([color=BLUE]setq[/color] el ([color=BLUE]entget[/color] en))))
             ([color=BLUE]mapcar[/color] '[color=BLUE]list[/color]
               ([color=BLUE]subst[/color]
                 ([color=BLUE]cons[/color]  10 ([color=BLUE]trans[/color] ([color=BLUE]cdr[/color] ([color=BLUE]assoc[/color] 10 el)) en 0))
                 ([color=BLUE]assoc[/color] 10 el)
                 ([color=BLUE]subst[/color] '(0 . [color=MAROON]"POINT"[/color]) '(0 . [color=MAROON]"CIRCLE"[/color]) el)
               )
             )
           )
         )
       )
       ([color=BLUE]entdel[/color] en)
     )
   )
 )
 ([color=BLUE]princ[/color])
)
           

Link to comment
Share on other sites

  • 4 years later...

Hi,

 

This LISP is amazing to create circles on all vertices without duplicates.

Can you please suggest some modifications to insert point instead of circles and auto numbering them..

 

Thanks in advance.

Link to comment
Share on other sites

Hi,

 

This LISP is amazing to create circles on all vertices without duplicates.

Can you please suggest some modifications to insert point instead of circles and auto numbering them..

 

Thanks in advance.

 

http://www.cadtutor.net/forum/showthread.php?46891-Insert-a-point-at-each-vertex-of-selected-polys&p=318150&viewfull=1#post318150

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