Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Length from Both side by Digit Entry

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
asim6687
784 Views, 7 Replies

Length from Both side by Digit Entry

Dear Friend i need any lisp that perform the Lengthen command from both side of Polyline by Digits Entry.

 

Thanks

 

7 REPLIES 7
Message 2 of 8
Kent1Cooper
in reply to: asim6687


@asim6687 wrote:

....i need any lisp that perform the Lengthen command from both side of Polyline by Digits Entry.

.... 


In simplest terms, assuming you want to Lengthen both ends by the same amount, and if both ends are out in the open, something like this:

 

(defun C:LPBE (/ delta pline); = Lengthen Polyline Both Ends
  (setq
    delta (getdist "\nEnter delta length: ")
    pline (car (entsel "\nSelect Polyline to Lengthen at Both Ends: "))
  ); setq
  (command
    "_.lengthen" "_delta" delta
    (vlax-curve-getStartPoint pline)
    (vlax-curve-getEndPoint pline)
    ""
  ); command
); defun

 

If either end might lie close enough to some other object that the other one might be "seen" by the Lengthen command, you would want to account for that somehow -- I can imagine a couple of different ways.

 

It could use various enhancements, such as selected-object-type control, locked Layer control, saving the length as a default and/or offering any current Lengthen-Delta value as a default, error handling, viability check [e.g. for an end arc segment that's of too small a radius for the delta value], etc.

Kent Cooper, AIA
Message 3 of 8
asim6687
in reply to: Kent1Cooper

Dear Kent Cooper,

 

thanks for your effort this lisp is increse the lenght can you help me for decrese the lenght.

 

thanks and best regards

 

Naveed

 

Message 4 of 8
Kent1Cooper
in reply to: asim6687


@asim6687 wrote:

.... 

thanks for your effort this lisp is increse the lenght can you help me for decrese the lenght.

....


Just give it a negative value for the "delta length."

Kent Cooper, AIA
Message 5 of 8
asim6687
in reply to: Kent1Cooper

for decrese need to select from both side. and units in negative

 

thank you very much

 

with best regards

 

Message 6 of 8
Kent1Cooper
in reply to: asim6687


@asim6687 wrote:

for decrese need to select from both side. and units in negative

.... 


It sounds as though you mean that the routine requires you to select a Polyline at both ends in order to shorten it at both ends.  Is that right?  That's not the way it works for me.  I select it once, anywhere, and if I gave it a negative "delta" value, both ends are shortened.

Kent Cooper, AIA
Message 7 of 8
asim6687
in reply to: Kent1Cooper

 

ALIGN MULTIPLE LINE TO ARC OR POLYLINE PATH 

  PLEASE HELP ME IN THIS ALSO

 

http://forums.autodesk.com/t5/AutoCAD-2010-2011-2012-DWG/ALIGN-MULTIPLE-LINE-TO-ARC-OR-POLYLINE-PATH...

 

 

DEAR ALL I NEED TO ALIGN SOME VERTICAL LINE TO ALIGN TO A POLYLINE PATH  TO CREAT A CUT&FILL SIGN MUNALY.

 

THANKS

 

 
Message 8 of 8
Kent1Cooper
in reply to: asim6687


@asim6687 wrote:
.... 

  PLEASE HELP ME IN THIS ALSO

 

http://forums.autodesk.com/t5/AutoCAD-2010-2011-2012-DWG/ALIGN-MULTIPLE-LINE-TO-ARC-OR-POLYLINE-PATH...

 

....


[In general, it's not a good idea to post the same question on more than one Forum -- people who find the question in one place may not be able to tell if it's been answered in another.  Since this is a new topic, I posted a Reply on the linked thread.]

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost