Jump to content

A CODE FOR DIVIDING OBJECTS WITH POINTS AS IN MEASURE AND DIVIDE COMMAND IN AUTOCAD BUT WAY MORE ADVANCED


Recommended Posts

Posted (edited)

DIVCURVES-INSERTING POINTS AS SPECIFIC DISTANCE.LSP

I am so sorry for not giving more details about the code.
Please read the following for more details:

 

;;; ===========================================================================
;;; Routine Name: DIVCURVES
;;; Logic & Concept: Mostafa Jalal
;;; Developer: Gemini + Grok
;;; Date: June 2026
;;; ===========================================================================
;;;
;;; DIVCURVES_V10.lsp - Enhancements:
;;; 1. Dedicated Feature Line Support (Option 6) with segment-by-segment processing.
;;; 2. Interactive Short Segment Logic [Middle/Vertices/Skip/All] for lines and curves.
;;; 3. Specialized Circle Division by Pieces for short circles.
;;; 4. Persistence of user choices for short segment handling.
;;; 5. Added [Skip] option for Curve/Line distance prompts to isolate processing.
;;; 6. Added [All] option to bypass repetitive prompting on multiple short segments.
;;; 7. FIX V10: Curve vs straight detection on AECC_FEATURE_LINE segments uses
;;;    a midpoint-sag test (chord-mid vs curve-mid) because the ActiveX curve
;;;    interface on Feature Lines reports chord length, making the old
;;;    arc-vs-chord length test always evaluate to "straight".
;;;    Curved feature-line segmentLen is also replaced with a 2-chord
;;;    approximation so division by distance follows the real arc.
;;; ===========================================================================

(vl-load-com)

;; Global variables for persistence of short segment choices
(if (not *div_short_arc_choice*) (setq *div_short_arc_choice* "Middle"))
(if (not *div_short_line_choice*) (setq *div_short_line_choice* "Vertices"))
(if (not *div_short_circ_choice*) (setq *div_short_circ_choice* "Middle"))
(if (not *div_short_circ_pieces*) (setq *div_short_circ_pieces* 4))

(defun c:DIVCURVES (/ ss dist i ent obj endParam pIdx segmentLen k divDist 
                      entType totalLen tempDist mainChoice filter mainMode circleMode 
                      numSlices isArc opt lastMain lastCircMode lastNumSlices 
                      lastDist lastDistLine temp oldDynPrompt p-list distLine
                      startPt endPt chordLen curveLen isCurveSegment 
                      shortSegChoice shortCircPieces bulk_arc bulk_line bulk_circ
                      midPt chordMid sagTol)

  ;; --- Environment Setup ---
  (setq oldDynPrompt (getvar "DYNPROMPT"))
  (setvar "DYNPROMPT" 0) 
  (setq p-list nil)
  
  ;; Reset bulk choices per run
  (setq bulk_arc nil bulk_line nil bulk_circ nil)
  
  ;; --- Memory Retrieval ---
  (setq lastMain (getenv "DIV_MainChoice"))
  (if (or (null lastMain) (= lastMain "")) (setq lastMain "7"))
  (setq lastCircMode (getenv "DIV_CircMode"))
  (if (or (null lastCircMode) (= lastCircMode "")) (setq lastCircMode "Distance"))
  (setq lastNumSlices (getenv "DIV_NumSlices"))
  (if (or (null lastNumSlices) (= lastNumSlices "")) (setq lastNumSlices "4"))
  (setq lastDist (getenv "DIV_Dist"))
  (if (or (null lastDist) (= lastDist "")) (setq lastDist "0.50"))
  (setq lastDistLine (getenv "DIV_DistLine"))
  (if (or (null lastDistLine) (= lastDistLine "")) (setq lastDistLine "1.00"))

  ;; Retrieve short segment choices
  (setq *div_short_arc_choice* (getenv "DIV_ShortArcChoice"))
  (if (or (null *div_short_arc_choice*) (= *div_short_arc_choice* "")) (setq *div_short_arc_choice* "Middle"))
  (setq *div_short_line_choice* (getenv "DIV_ShortLineChoice"))
  (if (or (null *div_short_line_choice*) (= *div_short_line_choice* "")) (setq *div_short_line_choice* "Vertices"))
  (setq *div_short_circ_choice* (getenv "DIV_ShortCircChoice"))
  (if (or (null *div_short_circ_choice*) (= *div_short_circ_choice* "")) (setq *div_short_circ_choice* "Middle"))
  (setq *div_short_circ_pieces* (getenv "DIV_ShortCircPieces"))
  (if (or (null *div_short_circ_pieces*) (= *div_short_circ_pieces* "")) (setq *div_short_circ_pieces* 4) (setq *div_short_circ_pieces* (atoi *div_short_circ_pieces*)))

  ;; --- 1. MAIN MENU ---
  (initget "1 2 3 4 5 6 7 1-Polylines 2-Lines 3-Arcs 4-Circles 5-Splines 6-FeatureLines 7-All")
  (setq opt (getkword (strcat "\nSelect: [1-Polylines/2-Lines/3-Arcs/4-Circles/5-Splines/6-FeatureLines/7-All] <" lastMain ">: ")))
  (if (not opt) (setq opt lastMain))
  (cond
    ((wcmatch (strcase opt) "*6*,*FEAT*") (setq opt "6"))
    ((wcmatch (strcase opt) "*1*,*POLY*") (setq opt "1"))
    ((wcmatch (strcase opt) "*2*,*LINE*") (setq opt "2"))
    ((wcmatch (strcase opt) "*3*,*ARC*")  (setq opt "3"))
    ((wcmatch (strcase opt) "*4*,*CIRC*") (setq opt "4"))
    ((wcmatch (strcase opt) "*5*,*SPLI*") (setq opt "5"))
    ((wcmatch (strcase opt) "*7*,*ALL*")  (setq opt "7"))
  )
  (setenv "DIV_MainChoice" opt) 
  (setq mainChoice opt)

  ;; --- 2. SUB-PROMPTS ---
  (if (or (= mainChoice "4") (= mainChoice "7"))
    (progn
      (initget "Distance Pieces")
      (setq temp (getkword (strcat "\nCircle Mode [Distance/Pieces] <" lastCircMode ">: ")))
      (if (not temp) (setq circleMode lastCircMode) (progn (setq circleMode temp) (setenv "DIV_CircMode" temp)))
      (if (= circleMode "Pieces")
        (progn
          (setq temp (getint (strcat "\nEnter number of slices <" lastNumSlices ">: ")))
          (if (not temp) (setq numSlices (atoi lastNumSlices)) (progn (setq numSlices temp) (setenv "DIV_NumSlices" (itoa temp))))))))

  ;; --- 3. INPUT ROUTINES ---
  ;; Curve Distance
  (if (member mainChoice '("1" "3" "4" "5" "6" "7"))
    (progn 
      (setq temp (getstring t (strcat "\nCurve distance [Middle/Skip] <" lastDist ">: ")))
      (if (= temp "") (setq temp lastDist))
      (cond
        ((wcmatch (strcase temp) "M*") (setq dist "Middle"))
        ((wcmatch (strcase temp) "S*") (setq dist "Skip"))
        (t (setq dist (distof temp))))
      (if (not dist) (setq dist lastDist))
      (setenv "DIV_Dist" (if (numberp dist) (rtos dist 2 4) dist))))
  
  ;; Line Distance
  (if (member mainChoice '("1" "2" "5" "6" "7"))
    (progn 
      (setq temp (getstring t (strcat "\nLine distance [Middle/Vertices/Skip] <" lastDistLine ">: ")))
      (if (= temp "") (setq temp lastDistLine))
      (cond
        ((wcmatch (strcase temp) "M*") (setq distLine "Middle"))
        ((wcmatch (strcase temp) "V*") (setq distLine "Vertices"))
        ((wcmatch (strcase temp) "S*") (setq distLine "Skip"))
        (t (setq distLine (distof temp))))
      (if (not distLine) (setq distLine lastDistLine))
      (setenv "DIV_DistLine" (if (numberp distLine) (rtos distLine 2 4) distLine))))

  ;; --- 4. FILTER ---
  (cond
    ((= opt "1") (setq filter '((0 . "*POLYLINE")) mainMode "Polylines"))
    ((= opt "2") (setq filter '((0 . "LINE"))      mainMode "Lines"))
    ((= opt "3") (setq filter '((0 . "ARC"))       mainMode "Arcs"))
    ((= opt "4") (setq filter '((0 . "CIRCLE"))    mainMode "Circles"))
    ((= opt "5") (setq filter '((0 . "SPLINE"))    mainMode "Splines"))
    ((= opt "6") (setq filter '((0 . "AECC_FEATURE_LINE")) mainMode "FeatureLines"))
    (t            (setq filter '((0 . "LINE,*POLYLINE,ARC,CIRCLE,SPLINE,AECC_FEATURE_LINE")) mainMode "All"))
  )

  (princ (strcat "\nSelect " mainMode " objects: "))
  (setq ss (ssget filter))
  
  ;; --- 5. PROCESSING ---
  (if ss
    (progn
      (setq i 0)
      (repeat (sslength ss)
        (setq ent (ssname ss i)
              entType (cdr (assoc 0 (entget ent)))
              obj (if (= entType "AECC_FEATURE_LINE") ent (vlax-ename->vla-object ent))
              endParam (vlax-curve-getEndParam obj)
              totalLen (vlax-curve-getDistAtParam obj endParam)
              p-list nil) 

        (cond
          ;; Handle Polylines and Feature Lines
          ((or (wcmatch entType "*POLYLINE*") (= entType "AECC_FEATURE_LINE"))
            (setq pIdx 0)
            (while (< pIdx endParam)
              (setq startPt (vlax-curve-getPointAtParam obj pIdx))
              (setq endPt (vlax-curve-getPointAtParam obj (1+ pIdx)))
              (setq segmentLen (- (vlax-curve-getDistAtParam obj (1+ pIdx)) (vlax-curve-getDistAtParam obj pIdx)))
              (setq chordLen (distance startPt endPt))

              ;; --- V10 FIX: midpoint-sag test (works for polylines AND feature lines) ---
              (setq midPt    (vlax-curve-getPointAtParam obj (+ pIdx 0.5)))
              (setq chordMid (mapcar '(lambda (a b) (/ (+ a b) 2.0)) startPt endPt))
              (setq sagTol   (max 1e-3 (* 1e-4 chordLen)))
              (setq isCurveSegment (> (distance midPt chordMid) sagTol))

              ;; For AECC_FEATURE_LINE the API returns chord length on curved
              ;; segments. Approximate true arc length with 2 sub-chords so the
              ;; "short segment" test and divide-by-distance follow the real arc.
              (if (and isCurveSegment (= entType "AECC_FEATURE_LINE"))
                (setq segmentLen (+ (distance startPt midPt) (distance midPt endPt))))
              
              (setq tempDist (if isCurveSegment dist distLine))

              (if (not (= tempDist "Skip"))
                (progn
                  (DIV:SafeMark obj startPt)
                  (DIV:SafeMark obj endPt)

                  ;; Interactive short segment logic
                  (if (and (numberp tempDist) (> tempDist 0) (< segmentLen tempDist))
                    (progn
                      (setq shortSegChoice (if isCurveSegment bulk_arc bulk_line))
                      (if (null shortSegChoice)
                        (progn
                          (initget "Middle Vertices Skip All")
                          (setq shortSegChoice (getkword (strcat "\nShort segment (Len: " (rtos segmentLen 2 3) ") [Middle/Vertices/Skip/All] <" (if isCurveSegment *div_short_arc_choice* *div_short_line_choice*) ">: ")))
                          (if (null shortSegChoice) (setq shortSegChoice (if isCurveSegment *div_short_arc_choice* *div_short_line_choice*)))
                          (if (= shortSegChoice "All")
                            (progn
                              (setq shortSegChoice (if isCurveSegment *div_short_arc_choice* *div_short_line_choice*))
                              (if isCurveSegment (setq bulk_arc shortSegChoice) (setq bulk_line shortSegChoice))))
                          (if isCurveSegment (setenv "DIV_ShortArcChoice" shortSegChoice) (setenv "DIV_ShortLineChoice" shortSegChoice))
                        )
                      )
                      (cond
                        ((= shortSegChoice "Middle") (process-segment-fixed obj pIdx segmentLen "Middle"))
                        ((= shortSegChoice "Vertices") nil)
                        ((= shortSegChoice "Skip") nil)
                      )
                    )
                    (if tempDist (process-segment-fixed obj pIdx segmentLen tempDist))
                  )
                )
              )
              (setq pIdx (1+ pIdx))))

          ;; Handle Splines
          ((= entType "SPLINE")
            (if (not (= dist "Skip"))
              (progn
                (DIV:SafeMark obj (vlax-curve-getStartPoint obj))
                (if (not (vlax-curve-isClosed obj)) (DIV:SafeMark obj (vlax-curve-getEndPoint obj)))
                (process-standalone-fixed obj totalLen dist 0 numSlices circleMode))))

          ;; Handle standalone Lines, Arcs, Circles
          (t 
            (setq tempDist (if (or (= entType "ARC") (= entType "CIRCLE")) dist distLine))

            (if (not (= tempDist "Skip"))
              (progn
                (DIV:SafeMark obj (vlax-curve-getStartPoint obj))
                (if (not (vlax-curve-isClosed obj)) (DIV:SafeMark obj (vlax-curve-getEndPoint obj)))

                (if (and (numberp tempDist) (> tempDist 0) (< totalLen tempDist))
                  (progn
                    (cond
                      ((= entType "CIRCLE")
                        (if bulk_circ
                          (setq shortSegChoice bulk_circ)
                          (progn
                            (initget "Middle Pieces Skip All")
                            (setq shortSegChoice (getkword (strcat "\nShort Circle (Len: " (rtos totalLen 2 3) ") [Middle/Pieces/Skip/All] <" *div_short_circ_choice* ">: ")))
                            (if (null shortSegChoice) (setq shortSegChoice *div_short_circ_choice*))
                            (if (= shortSegChoice "All")
                              (progn
                                (setq shortSegChoice *div_short_circ_choice*)
                                (setq bulk_circ shortSegChoice)))
                            (setenv "DIV_ShortCircChoice" shortSegChoice)
                          )
                        )
                        (cond
                          ((= shortSegChoice "Middle") (process-standalone-fixed obj totalLen "Middle" 0 numSlices circleMode))
                          ((= shortSegChoice "Pieces")
                            (setq temp (getint (strcat "\nEnter number of slices <" (itoa *div_short_circ_pieces*) ">: ")))
                            (if (not temp) (setq shortCircPieces *div_short_circ_pieces*) (setq shortCircPieces temp))
                            (setenv "DIV_ShortCircPieces" (itoa shortCircPieces))
                            (process-standalone-fixed obj totalLen "Distance" 0 shortCircPieces "Pieces"))
                          ((= shortSegChoice "Skip") nil)
                        )
                      )
                      ((= entType "ARC")
                        (if bulk_arc
                          (setq shortSegChoice bulk_arc)
                          (progn
                            (initget "Middle Vertices Skip All")
                            (setq shortSegChoice (getkword (strcat "\nShort Arc (Len: " (rtos totalLen 2 3) ") [Middle/Vertices/Skip/All] <" *div_short_arc_choice* ">: ")))
                            (if (null shortSegChoice) (setq shortSegChoice *div_short_arc_choice*))
                            (if (= shortSegChoice "All")
                              (progn
                                (setq shortSegChoice *div_short_arc_choice*)
                                (setq bulk_arc shortSegChoice)))
                            (setenv "DIV_ShortArcChoice" shortSegChoice)
                          )
                        )
                        (cond
                          ((= shortSegChoice "Middle") (process-standalone-fixed obj totalLen "Middle" 0 numSlices circleMode))
                          ((= shortSegChoice "Vertices") nil)
                          ((= shortSegChoice "Skip") nil)
                        )
                      )
                      ((= entType "LINE")
                        (if bulk_line
                          (setq shortSegChoice bulk_line)
                          (progn
                            (initget "Middle Vertices Skip All")
                            (setq shortSegChoice (getkword (strcat "\nShort Line (Len: " (rtos totalLen 2 3) ") [Middle/Vertices/Skip/All] <" *div_short_line_choice* ">: ")))
                            (if (null shortSegChoice) (setq shortSegChoice *div_short_line_choice*))
                            (if (= shortSegChoice "All")
                              (progn
                                (setq shortSegChoice *div_short_line_choice*)
                                (setq bulk_line shortSegChoice)))
                            (setenv "DIV_ShortLineChoice" shortSegChoice)
                          )
                        )
                        (cond
                          ((= shortSegChoice "Middle") (process-standalone-fixed obj totalLen "Middle" 0 numSlices circleMode))
                          ((= shortSegChoice "Vertices") nil)
                          ((= shortSegChoice "Skip") nil)
                        )
                      )
                    )
                  )
                  (if tempDist (process-standalone-fixed obj totalLen tempDist 0 numSlices circleMode))
                )
              )
            )
          )
        )
        (setq i (1+ i)))
      (princ (strcat "\nProcessed " (itoa (sslength ss)) " objects."))))

  (setvar "DYNPROMPT" oldDynPrompt)
  (princ)
)

;; ====================== HELPER FUNCTIONS ======================

(defun DIV:SafeMark (obj pt / checkPt)
  (if (and pt (listp pt))
    (progn
      (setq checkPt (vlax-curve-getClosestPointTo obj pt))
      (if (and (equal pt checkPt 1e-4) (not (vl-some '(lambda (x) (equal pt x 1e-3)) p-list)))
        (progn (entmake (list '(0 . "POINT") (cons 10 pt))) (setq p-list (cons pt p-list)))))))

(defun process-segment-fixed (obj pIdx segmentLen tempDist / k divDist)
  (cond
    ((= tempDist "Vertices") nil)
    ((= tempDist "Middle") (DIV:SafeMark obj (vlax-curve-getPointAtParam obj (+ pIdx 0.5))))
    ((and (numberp tempDist) (> tempDist 0))
     (if (> tempDist segmentLen)
       (DIV:SafeMark obj (vlax-curve-getPointAtParam obj (+ pIdx 0.5)))
       (progn
         (setq k 1)
         (while (< (* k tempDist) (- segmentLen 0.001))
           (setq divDist (+ (vlax-curve-getDistAtParam obj pIdx) (* k tempDist)))
           (DIV:SafeMark obj (vlax-curve-getPointAtDist obj divDist))
           (setq k (1+ k))))))))

(defun process-standalone-fixed (obj totalLen tempDist offset numSlices circleMode / k)
  (cond
    ((= tempDist "Vertices") nil)
    ((= tempDist "Middle") (DIV:SafeMark obj (vlax-curve-getPointAtDist obj (+ offset (* totalLen 0.5)))))
    ((and (= circleMode "Pieces") (numberp numSlices) (> numSlices 1))
     (setq k 1)
     (repeat (1- numSlices)
       (DIV:SafeMark obj (vlax-curve-getPointAtDist obj (* k (/ totalLen (float numSlices)))))
       (setq k (1+ k))))
    ((and (numberp tempDist) (> tempDist 0))
     (if (> tempDist totalLen)
       (DIV:SafeMark obj (vlax-curve-getPointAtDist obj (+ offset (* totalLen 0.5))))
       (progn
         (setq k 1)
         (while (< (* k tempDist) (- totalLen 0.001))
           (DIV:SafeMark obj (vlax-curve-getPointAtDist obj (+ offset (* k tempDist))))
           (setq k (1+ k))))))))
 

 When executed, the utility launches an interactive keyword configuration:  

 Menu: [1-Polylines/2-Lines/3-Arcs/4-Circles/5-Splines/6-FeatureLines/7-All] 

                                                                            

 --- OPTION 1: Polylines ---                                                

  - Target: Native 2D LWPolylines and 3D Heavy Polylines (*POLYLINE).       

  - Sub-Prompts: Asks for both "Curve distance" and "Line distance".         

  - Workflow Logic: Polylines frequently alternate between straight tangents 

    and arced bulges. The engine runs through each sub-segment parameter,   

    applying the Curve interval on loops returning a non-zero bulge and the 

    Line interval on zero-bulge vectors. Critical for tracking centerlines. 

                                                                            

 --- OPTION 2: Lines ---                                                    

  - Target: Standalone native LINE entities (completely ignores curves).    

  - Sub-Prompts: Triggers only "Line distance [Middle/Vertices]".           

  - Workflow Logic:                                                         

    * Absolute Number: Measures out fixed structural intervals from start.  

    * "Middle": Drops a single layout node at exactly Total Length / 2.      

    * "Vertices": Flags only the absolute start and endpoints, bypassing    

       any segment division calculations. Perfect for boundary box indexing. 

                                                                            

 --- OPTION 3: Arcs ---                                                     

  - Target: Standalone open circular ARC elements.                          

  - Sub-Prompts: Triggers only "Curve distance [Middle]".                  

  - Workflow Logic: Uses true structural arc-length path calculations (not  

    straight-line chord spacing). Entering "Middle" isolates the exact apex 

    mid-curve station node. Excellent for curb returns or radius layout.    

                                                                            

 --- OPTION 4: Circles ---                                                  

  - Target: Full, closed 360-degree CIRCLE elements.                        

  - Sub-Prompts: 1. Circle Mode [Distance/Pieces]                           

                 2. Curve Distance (if Distance Mode)                       

                 3. Number of Slices (if Pieces Mode)                       

  - Workflow Logic:                                                         

    * Pieces Mode: Divides the 360° rim into perfectly equal pie sections.  

      Ideal for setting layout coordinates for manholes or foundation piles. 

    * Distance Mode: Steps linearly around the outer circumference.         

                                                                            

 --- OPTION 5: Splines ---                                                 

  - Target: Non-uniform smooth organic SPLINE curve strings.                

  - Sub-Prompts: Triggers "Curve distance" and "Line distance".             

  - Workflow Logic: Utilizes Visual LISP curve projection vectors to step   

    smoothly through changing multi-radius landscape or contour paths,      

    automatically trapping and marking the true start/end index boundaries. 

                                                                            

 --- OPTION 6: FeatureLines ---                                            

  - Target: Native Autodesk Civil 3D Feature Lines (AECC_FEATURE_LINE).     

  - Sub-Prompts: Triggers "Curve distance" and "Line distance".             

  - Workflow Logic: Tailored for civil infrastructure models. The engine    

    interrogates the 3D string, locks all critical grade breaks and site    

    vertices, and overlays intermediate interval layout points that retain  

    design model accuracy.                                                  

                                                                            

 --- OPTION 7: All ---                                                      

  - Target: Simultaneous mixed selection set of all supported geometries.  

  - Sub-Prompts: Sequential configuration parameters for all curves/lines.  

  - Workflow Logic: Scans the entire cross-window selection. For every object

    trapped, it reads its DXF Group 0 type, dynamically assigns your preset 

    rules, avoids duplicate coordinate overlaps, and populates the entire   

    site plan layer in a single execution click.        

 SHORT SEGMENT OVERRIDE LOGIC:                                              

 If an entity length or sub-segment is shorter than the interval distance   

 specified, the script halts and prompts: [Middle/All/SkipAll]              

                                                                            

  - "Middle": Drops a layout node exactly at the center of that specific    

    short segment.                                                          

  - "All": Converts the current short vector and all subsequent short vectors

    discovered during the current command run into midpoints automatically. 

  - "SkipAll": Ignores short segments entirely for the rest of the execution,

    leaving them clean and checking only major length spans.   
 

 SHORT SEGMENT OVERRIDE LOGIC:                                             

 If an entity length or sub-segment is shorter than the interval distance  

 specified, the script halts and prompts: [Middle/All/SkipAll]             

                                                                           

  - "Middle": Drops a layout node exactly at the center of that specific   

    short segment.                                                         

  - "All": Converts the current short vector and all subsequent short vectors

    discovered during the current command run into midpoints automatically.

  - "SkipAll": Ignores short segments entirely for the rest of the execution,

    leaving them clean and checking only major length spans.               

             

                    

Edited by darshjalal
  • Like 1
Posted (edited)

If your offering something a good idea is to provide images or a movie about what the program does, else the "Why bother" will occur. Just attaching  a lisp is not really describing why you should download the program.

 

Think of it as if I was selling the program how would I get people interested.

 

 

Edited by BIGAL
  • Agree 2
Posted

Inside the code there is explanation of the code function.
The code does many functions  that image can't explain. Kindly check the code and read the description inside.
Regards.

Posted
4 hours ago, darshjalal said:

Inside the code there is explanation of the code function.
The code does many functions  that image can't explain. Kindly check the code and read the description inside.
Regards.

@darshjalal Thanks for your program contribution.

 

I don't want to take away for your obvious hard work, but I somewhat agree with @BIGAL.

I have read the extensive comments that are very detailed and technical, but there is no summary of what it is used for, or how it is useful. For the casual LISP user, they would not understand the value in such a program. I think a simple paragraph would be help instead of blindly evaluating it. Your title does explain the purpose of the program, but it's too vague and some plain language on how the features are helpful would be nice - just a friendly critique 😀

  • Like 1
  • Agree 2
Posted (edited)

if Nothing else it would show up in peoples searches. just posting a file even tho it has great documentation will not show up in searches. if you take all the time to write things up and share here make it so people can find your lisp files.  or just copy all the ;; lines. someone in 6 months to a year will post looking for a divide lisp with points and I won't be able to find this post.

 

-Edit

like you did here

 

Edited by mhupp
  • Like 1
  • Agree 1
Posted

@darshjalal OK - so you updated the first post - with the comments that could already be read in the file. What I asked for was:

 

1) what it is used for?

2) how it is useful?

3) how the features are helpful?

 

That's all we were asking, rather than the extremely technical description.

Posted

If your offering something a good idea is to provide images or a movie about what the program does, else the "Why bother" will occur.

"(setq oldDynPrompt (getvar "DYNPROMPT"))  Fails in Bricscad V25.

 

Here is a freebie for you I dont uses initget.

Multi radio buttons.lsp

(if (not AH:Butts)(load "Multi radio buttons.lsp"))
(setq ans (ah:butts but "V"   '("Please choose" "1-Polylines" "2-Lines" "3-Arcs" "4-Circles" "5-Splines" "6-FeatureLines" "7-All")))

image.png.109213a7334383ce5f801cd94aa6d4e7.png

 

You ask for a distance only so it would make sense that it ask for intervals, we did road design and in an intersection kerb the curve was nearly always based on 4 points. maybe when asked for a distance enter a -ve value say -4 means break into 4 even spacing.

 

Have added a couple of other make dcl on the fly for you just leave my name in the code but free to use. You can make a dcl then convert it to lsp code using write-line for the dcl code so dont need the MULTI's.Multi GETVALS.lspMulti toggles.lsp

 

 

  • Like 1
Posted
10 hours ago, BIGAL said:

If your offering something a good idea is to provide images or a movie about what the program does, else the "Why bother" will occur.

"(setq oldDynPrompt (getvar "DYNPROMPT"))  Fails in Bricscad V25.

 

Here is a freebie for you I dont uses initget.

Multi radio buttons.lsp 2.73 kB · 104 downloads

(if (not AH:Butts)(load "Multi radio buttons.lsp"))
(setq ans (ah:butts but "V"   '("Please choose" "1-Polylines" "2-Lines" "3-Arcs" "4-Circles" "5-Splines" "6-FeatureLines" "7-All")))

image.png.109213a7334383ce5f801cd94aa6d4e7.png

 

You ask for a distance only so it would make sense that it ask for intervals, we did road design and in an intersection kerb the curve was nearly always based on 4 points. maybe when asked for a distance enter a -ve value say -4 means break into 4 even spacing.

 

Have added a couple of other make dcl on the fly for you just leave my name in the code but free to use. You can make a dcl then convert it to lsp code using write-line for the dcl code so dont need the MULTI's.Multi GETVALS.lspMulti toggles.lsp

 

 

Your name of course will be there always.
You too free to use any code I am posting here or modify it for the better ideas.
Thank you so much.
Regards.

  • Thanks 1

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