Jump to content

Programs and Scripts

AutoLISP, VisualLISP and VBA Programs are for use with AutoCAD software.

36 files

  1. Apollonius-problem-solved.LSP

    Apollonius problem : (PPP, LPP, LLP, LLL, CPP, CLP, CLL, CCP, CCL, CCC)
    P - point
    L - line
    C - circle
     
    Routine finds all CIRCLES that touches or passes (point) as tangent curves to combination of (C - circle; L - line; P - point)
     
    Relevant page on Wikipedia :
    https://en.wikipedia.org/wiki/Problem_of_Apollonius

    And my video demonstrating my routine :
    https://youtu.be/cuo4M9UGZmA

    Number of circles demonstrated in video corresponds to Wikipedia table at the end of page...

    Regards, Marko Ribar, d.i.a. (architect)

    531 downloads

       (1 review)

    1 comment

    Submitted

  2. EDGENET-NEWEST-LSP-ROUTINES-BY-MR.ZIP

    ;-------------------------------------------------; ;   EDGENET ROUTINE - TWIN OF COMMAND EDGESURF    ; ;-------------------------------------------------; ;   Author : Marko Ribar, d.i.a. (architect)      ; ;   Copyright (C) - All rights reserved, 11.2019. ; ;-------------------------------------------------; ;   You have permission to copy any part of code  ; ;   with guarantee that this header will be       ; ;   present in material that is modified or       ; ;   partly remained the same as in this routine   ; ;   version. If header is removed, you are        ; ;   responsible to mention author and link from   ; ;   where the code is publiced with explicit      ; ;   mark that material is copyrighted and is not  ; ;   for further distribution or selling or base   ; ;   for gaining any material or any other benefit ; ;   than for learning and study and eventual      ; ;   improvement of its present functionality.     ; ;-------------------------------------------------;  
    edgenet-newest.lsp is routine that works similar to command EDGESURF... The difference between EDGESURF and EDGENET-NEWEST.LSP is that LSP version makes Polygon Mesh that is with softer and smaller magnitude lofting approximation... If you wish you can check several routines packed in ZIP and find the one you prefer... They are little slower than built-in EDGESURF, but nevertheless IMHO they are good examples of how this task can be solved from LISP perspective... As always I am opened for any input and your versions (if you have and willing to share)...
     
    Regards, Marko Ribar, d.i.a. (architect)

    363 downloads

       (0 reviews)

    0 comments

    Submitted

  3. FlowSelect

    Here I present you a program that allows you to select a chain of curve whose end points resides anywhere along other curves residing in the same layer.
     
    This inspiration came from selecting one line that represents a flow line from a branch of a hydraulic drain set, and will then proceed to select the whole set of lines for that drain. Put it in other terms, it's similar to selecting a whole tree by simply selecting one of its branches.

    475 downloads

       (0 reviews)

    0 comments

    Updated

  4. Multiple Toggles.lsp

    Multiple Toggles is a library routine that allows you to create as many Toggles of input as required (subject to Autocad limits) using a dialouge rather than the command line. 
      
    Its use is intended where you want the user to pick one or more values. It can be used where you want to run a number of functions, pick multiple values to be used.
      
    It can be used in most lisp code with just a couple of lines of code, compared to a hard coded solution of around 50+ lines repeated every time you want to use a dcl. 
      
    To use just save the "Multiple Toggles.lsp" to a directory that is included in you Autocad search path. If you need more information how to do this send an email to info@alanh.com.au  
      
    It only requires 2 lines of code in any lisp to use.
    (if (not AH:Toggs)(load "Multiple toggles.lsp"))
    (setq ans (AH:toggs (list "Change blank for yes " "Blocks" "Dimension" "Hatch" "Images" "Viewports" )))
    In the example above the variable ans will have the toggle Values 1 or 0 for a toggle clicked on eg ("1" "0" "1" "0" "1") depending on toggle selected.
      
    If you want further information or conversion of your code email info@alanh.com.au

    890 downloads

       (2 reviews)

    0 comments

    Submitted

  5. Multi Getvals.lsp

    Multiple Inputs 

    Multiple Input DCL is a library routine that allows you to create as many lines of input as required (subject to Autocad limits) using a dialouge rather than the command line. 

    It can be used in most lisp code with just a couple of lines of code, compared to a hard coded solution of around 50+ lines repeated every time you want to use a dcl.

    To use just save the "Getvals multi.lsp" to a directory that is included in you Autocad search path. If you need more information how to do this send an email to info@alanh.com.au 

    It only requires 2 lines of code in any lisp to use.
     (if (not AH:getvals)(load "Getvals multi.lsp")) ; check if already loaded else load
    (setq yourlist (ah:getvals '("Xfall percent"  "Enter Horizontal scale " 5 4 "100" "Enter Vertical scale" 5 4 "50" "Enter number of decimal places" 5 4 "2")))

    There is extra examples in the top of the code about how to use. You can have 1 entry or as many as required subject to screen size.
     
    For complete example contact info@alanh.com.au and we will send some more example code load and a working example "Make furniture table.lsp"
     
    For testing just copy the two lines of code to the command line you will see a "list" of the result. You can then convert if required to a real or integer using Atof or Atoi.
     

    1,011 downloads

       (0 reviews)

    0 comments

    Submitted

  6. Global Attribute Edit with Layout Selection

    This small program works just like AutoCAD's GATTE express tool, with the extra option of choosing which layouts to apply attribute changes to.
     
    GATTE2 is made in lisp and uses CAB's Layout Select program to select which layouts you want. Make sure you place LayoutSelect.dcl in an AutoCAD search path or GATTE2 will not work!
     

     
    Required Files:
    gatte2.lsp
    LayoutSelect.dcl
    Both in gatte2.zip
     
    See this thread for more details.
     
    Function Syntax: gatte2
    For instructions on how to run the program see here.

    576 downloads

       (0 reviews)

    0 comments

    Updated

  7. Zoom Extents on All Viewports

    A neat little utility that will zoom extents on all your viewports.
     
    Function Syntax: ze
    For instructions on how to run the program see here.

    389 downloads

       (0 reviews)

    0 comments

    Submitted

  8. Piping/Ducting for HVAC

    This is a program made by ASMI and modified by Ronso in this thread. This is a genius free LISP Program and can be used in many trades, but has most usefulness in the HVAC, Mechanical, and Piping industries for drawing 2D CAD designs. It allows you to create Duct, Pipe, and Segmented Duct or Piping with automatic elbow or fittings to accurate dimensions via some initial input at the command prompt.
     
    The programme in action

     
    Function Syntax: DUCT
    For instructions on how to run the program see here.

    2,013 downloads

       (1 review)

    0 comments

    Updated

  9. Line Length Calculator

    This program will calculate the total length of Lines/Polylines/LWPolylines/Arcs/Ellipses/Circles/Splines with an optional filter.
    The Filter may be used to select only those lines that are on a certain layer, or perhaps have a certain linetype or colour.
    The results of the calculation can be displayed in an ACAD Table within the drawing, or written to either a CSV or TXT File. The Table-Style may be selected from the drop-down in the main dialog.
     
    Main interface

     
    The main dialogue box allows the user to filter lines by layer, linetype or colour and select the table style. Multiple selected items can filtered. A filter string may be entered to help the user quickly find the filter items that he/she requires.
     
    Options

     
    The options dialogue box allows the user to specify which object types should be included and the type of output, table in the drawing, CSV file or TXT file.
     
    Demo

     
    Function Syntax: LenCal
    For instructions on how to run the program see here.
    Any comments, criticism and suggestions are welcome. Either PM me directly, or reply to the original thread.
     

    2,618 downloads

       (3 reviews)

    1 comment

    Submitted

  10. Total Length/Area of all Polylines on a Layer

    This AutoLISP file can be used to measure the total length or area of all polylines on a selected layer.
    Instructions on how to load and run this file in AutoCAD are given in this thread.

    1,150 downloads

       (0 reviews)

    0 comments

    Submitted

  11. Flatten a 3D Drawing

    This AutoLISP file can be used to flatten a 3D drawing. It does this by setting all Z values in the drawing to zero.
    Instructions on how to load and run this file in AutoCAD are given in this thread.

    1,093 downloads

       (0 reviews)

    0 comments

    Updated


×
×
  • Create New...