Jump to content

Help me take a look at this lisp ,thanks!


highflybird

Recommended Posts

Hey guys,

 

This program can do like this:

20140116012516.jpg

 

Only can choose pline, unsupported line ,

20140116013230.jpg

 

How to make it support Line ? Thanks for any help!

opening.lsp

Edited by highflybird
Link to comment
Share on other sites

Opened code seems over the top for a pretty simple task ? Also there is a language problem.

 

Draw circle and use trim ?

 

BIGAL,Thank you! How to support line?

Link to comment
Share on other sites

Easiest way will be to call first PEDIT built-in command to convert the lines to a polyline - either manually or by code.

 

As for your code, it is filled with a lot of special characters, so will be very dificult for one to attempt to adjust it.

Link to comment
Share on other sites

Easiest way will be to call first PEDIT built-in command to convert the lines to a polyline - either manually or by code.

 

As for your code, it is filled with a lot of special characters, so will be very dificult for one to attempt to adjust it.

 

Thank you Msasu,Can ues "PEDIT" ,but I want change in the codes,I have already upload again

opening.lsp

Link to comment
Share on other sites

I still think code is over top just did add circle then trim 3 picks, PE join 3 objects ? even using the co-ords of the pline it would be simple to do mathmatically create a new pline.

Link to comment
Share on other sites

I still think code is over top just did add circle then trim 3 picks, PE join 3 objects ? even using the co-ords of the pline it would be simple to do mathmatically create a new pline.

 

Not quite understand.

Link to comment
Share on other sites

The lisp routine already references the use of lwpolyline and polyline. Now you want to add a reference for the line command as well?

 

Couldn't you borrow the code below and change "polyline" to "line" and insert it below the code that is already there?

 

AddLinetoCode.JPG

Link to comment
Share on other sites

This?

(defun c:test ( / peditaccept ss )
   (if (setq ss (ssget "_:L" '((0 . "ARC,LINE,LWPOLYLINE"))))
       (progn
           (setq peditaccept (getvar 'peditaccept))
           (setvar 'peditaccept 1)
           (command "_.pedit" "_M" ss "" "_J" "" "")
           (setvar 'peditaccept peditaccept)
       )
   )
   (princ)
)

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