See the top rated post in this thread. Click here

Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 54

Thread: Distance Lisp Routine Help

  1. #21
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Quote Originally Posted by BCrouse
    My ATTDIA variable set to (1)!
    Temporarily change it to >0< for this experiment. Then run the command again. I don't think this will fix the problem but I'm running out of options. After you run it let me know your results. And then you can change it back to >1<.

    Thanks.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  2. #22
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Quote Originally Posted by richardl.25628
    Temporarily change it to >0< for this experiment. Then run the command again. I don't think this will fix the problem but I'm running out of options. After you run it let me know your results. And then you can change it back to >1<.

    Thanks.
    Nothing happened when I set the attdia to (0). Try the routine with just a circle and text.

    Brad

  3. #23
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Brad,

    Try this version. I think the original version was not working due to a core AutoCAD routine that was improved in version 2005. (Zoom to object).

    This version will work down to ACAD 2000. With the Evacuation Distance Tag block you supplied earlier.

    Let me know how it works.
    Attached Files Attached Files
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #24
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Thumbs up Re: Distance Lisp Routine Help

    Quote Originally Posted by richardl.25628
    Brad,

    Try this version. I think the original version was not working due to a core AutoCAD routine that was improved in version 2005. (Zoom to object).

    This version will work down to ACAD 2000. With the Evacuation Distance Tag block you supplied earlier.

    Let me know how it works.
    Thank you, I works great. Just one more thing. Is there a way to have an arrow to end at the end point?

    Brad

  5. #25
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Quote Originally Posted by BCrouse
    Thank you, I works great. Just one more thing. Is there a way to have an arrow to end at the end point?

    Brad
    Do you want an arrowhead at each break point in addition to the current arrowheads?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #26
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    2

    Default Re: Distance Lisp Routine Help

    Try this.
    Code:
    (defun C:Evacuation (/ intAttDia lstSelection objSelection)
    (vl-load-com)
    (setq intAttdia (getvar "attdia"))
    (setvar "attdia" 0)
    (setq lstSelection (entselwithfilter '(list (cons 0 "POLYLINE"))
    									 "\nSelect polyline evacuation route: "
    					)
    	 objSelection (vlax-ename->vla-object (car lstSelection))
    )
    (vl-cmdf "insert" "EVACUATION DISTANCE TAG" (cadr lstSelection) "" "" "" "")
    (setvar "attdia" intAttDia)(vla-put-textstring
    (vlax-ename->vla-object (entnext (entlast)))
    (rtos (vlax-curve-getDistAtParam objSelection
    		 (vlax-curve-getEndParam objSelection)
    		)
    		4
    		0
    )
    )
    (prin1)
    )
    (defun entselWithFilter (lstOfFilters strPrompt / intOSMode lstPoint ssSelections)
    (vl-load-com)
    (if strPrompt
    (princ (strcat "\n" strPrompt))
    )
    (setq intOSMode (getvar "osmode"))
    (setvar "osmode" 512)
    (while (not (setq ssSelections (ssget (setq lstPoint (getpoint)) (eval lstOfFilters))))
    (princ "\nInvalid Selection Please Select Again: ")
    )
    (setvar "osmode" intOSMode)
    (print (getvar "lastpoint"))
    (list (ssname ssSelections 0) lstPoint)
    )
    Attached Files Attached Files
    Last edited by peter; 2005-09-26 at 04:38 PM.

  7. #27
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Peter, I hope you don't mind. I borrowed this bit (in red) of your code.
    Quote Originally Posted by peter
    Code:
     (vla-put-textstring
      (vlax-ename->vla-object (entnext (entlast)))
      (rtos (vlax-curve-getDistAtParam objSelection
    		 (vlax-curve-getEndParam objSelection)
    		)
    		4
    		0
      )
     )
    Brad, Let me know how this works.

    I included the block that I was using.

    Richard
    Attached Files Attached Files
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #28
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Thumbs up Re: Distance Lisp Routine Help

    Quote Originally Posted by richardl.25628
    Peter, I hope you don't mind. I borrowed this bit (in red) of your code.

    Brad, Let me know how this works.

    I included the block that I was using.

    Richard
    Richard,

    That is really awesome. Thank you very much. It really looks and works great! I will be adding to your rep.

    Brad

  9. #29
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Thumbs up Re: Distance Lisp Routine Help

    Quote Originally Posted by richardl.25628
    Peter, I hope you don't mind. I borrowed this bit (in red) of your code.

    Brad, Let me know how this works.

    I included the block that I was using.

    Richard
    Thank you you Peter.

    It is nice to such a diverse group of AUGI member with great knowledge of LISP.


    Brad

  10. #30
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Distance Lisp Routine Help

    Quote Originally Posted by BCrouse
    Thank you you Peter.

    It is nice to such a diverse group of AUGI member with great knowledge of LISP.


    Brad
    Brad,

    You are welcome. If it wasn't for Peter, I would have been stumped on the attribute portion for a bit. I havn't learned VLisp to its fullest extent, yet.

    And yes, Thank you as well Peter.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Surveying Bearing/Distance LISP Routine
    By BoarsNest01 in forum AutoLISP
    Replies: 59
    Last Post: 2017-03-02, 10:19 PM
  2. Help with a lisp routine to add a 12" line to this routine
    By Orbytal.edge341183 in forum AutoLISP
    Replies: 3
    Last Post: 2012-11-14, 10:33 PM
  3. Combine three lisp routine into one routine.
    By BrianTFC in forum AutoLISP
    Replies: 1
    Last Post: 2012-02-08, 12:14 PM
  4. Replies: 9
    Last Post: 2012-01-21, 07:58 AM
  5. distance routine
    By hernan.fuentes in forum AutoLISP
    Replies: 2
    Last Post: 2010-06-22, 02:36 AM

Posting Permissions

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