Results 1 to 4 of 4

Thread: Divide a line in 3'-0" increments

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

    Default Divide a line in 3'-0" increments

    Is the a lisp out there lat will Divide a line in 3'-0" increments?

    Thank you,

    Brad

  2. #2
    100 Club CADmium's Avatar
    Join Date
    2004-08
    Location
    Eberswalde, Germany, Europe
    Posts
    128
    Login to Give a bone
    0

    Default Re: Divide a line in 3'-0" increments

    like the autocad-commands "measure" or "divide" and "break" at the points ?

  3. #3
    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: Divide a line in 3'-0" increments

    Sorry about that. I totally forget the measure command. Everyone please diregard the thread!

  4. #4
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Divide a line in 3'-0" increments

    Quote Originally Posted by BCrouse
    Is the a lisp out there lat will Divide a line in 3'-0" increments?

    Thank you,

    Brad
    Hi Brad
    Here is my old routine change it what you want
    Spell my prompts and change point size by your needs

    Thank you

    f.
    Code:
    (defun C:divc (/	acsp	 dist	  dist_list	    div_len
    	       ept	inc_dist ln_ent	  ln_obj   pt	    pt_list
    	       spt	st_par
    	      )
      (vl-load-com)
      (setq	acsp (vla-get-modelspace
    	       (vla-get-activedocument
    		 (vlax-get-acad-object)
    	       )
    	     )
      )
      (setvar "cmdecho" 0)
      (setvar "osmode" 0)
      (setvar "pdsize" 25.000);change by suit
      (setvar "pdmode" 34)
      (setq
        ln_ent (entsel
    	     "\nSelect line near from you want start to divide it \n"
    	   )
      )
      (setq ln_obj (vlax-ename->vla-object (car ln_ent)))
      (setq pt (vlax-curve-getclosestpointto ln_obj (cadr ln_ent)))
      (if (> (distance pt (setq spt (vlax-curve-getstartpoint ln_obj)))
    	 (distance pt (setq ept (vlax-curve-getendpoint ln_obj)))
          )
        (progn
          (vlax-put ln_obj 'Startpoint ept)
          (vlax-put ln_obj 'Endpoint spt)
        )
      )
      (setq div_len (getdist "\nEnter increment in inches <3>\n"))
      (if (not div_len)
        (setq div_len 3.)
      )
      (setq	div_len	 (cvunit 3.0 "inch" "millimeters")
    	inc_dist div_len
    	st_par	 0.0
    	ln_len	 (vla-get-length ln_obj)
      )
      (setq	dist_list (list st_par)
    	dist	  0.0
    	cnt	  0
      )
      (while (< dist ln_len)
        (setq pt (vlax-curve-getpointatparam
    	       ln_obj
    	       (setq dist (+ dist (* cnt div_len)))
    	     )
        )
        (setq dist_list (cons dist dist_list))
        (if	pt
          (setq pt_list (cons pt pt_list))
        )
        (setq cnt (1+ cnt)
    	  pt  nil
        )
      )
      (foreach i pt_list
        (vlax-invoke acsp 'Addpoint i)
      )
      (setvar "cmdecho" 0)
      (setvar "osmode" 703);change by suit
      (princ)
    )
    (prompt "\n           | Programm is loaded.\n")
    (prompt "\n     ------------------------------\n")
    (prompt "           | Type DIVC to execute.")

Similar Threads

  1. Replies: 1
    Last Post: 2014-11-26, 11:22 AM
  2. How can I divide this curve line evenly?
    By mike99 in forum Revit Architecture - General
    Replies: 18
    Last Post: 2012-05-15, 04:09 PM
  3. "Divide Surface" in Revit 2010
    By ljohans in forum Revit Architecture - General
    Replies: 3
    Last Post: 2009-05-27, 12:40 AM
  4. Move in increments of 5 and Rotate in increments of 10 degrees
    By BRENDA_GZZ_GOMEZ in forum Dynamic Blocks - Technical
    Replies: 10
    Last Post: 2007-04-17, 04:17 PM
  5. Is there a "divide" command?
    By m_cahoon14336 in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-02-24, 02:57 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
  •